embulk 0.8.39-java → 0.10.24-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +1 -1
- data/LICENSE +202 -0
- data/embulk.gemspec +34 -33
- data/lib/embulk.rb +5 -61
- data/lib/embulk/buffer.rb +1 -2
- data/lib/embulk/guess/charset.rb +2 -11
- data/lib/embulk/java/bootstrap.rb +0 -1
- data/lib/embulk/java_plugin.rb +9 -1
- data/lib/embulk/page_builder.rb +2 -2
- data/lib/embulk/plugin.rb +2 -2
- data/lib/embulk/schema.rb +3 -4
- data/lib/embulk/version.rb +3 -22
- metadata +22 -757
- data/.gitignore +0 -15
- data/.ruby-version +0 -1
- data/.travis.yml +0 -28
- data/COPYING +0 -14
- data/Gemfile.lock +0 -30
- data/README.md +0 -229
- data/Rakefile +0 -26
- data/appveyor.yml +0 -28
- data/bin/embulk +0 -139
- data/build.gradle +0 -419
- data/embulk-cli/build.gradle +0 -9
- data/embulk-cli/src/main/bat/selfrun.bat +0 -107
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkArguments.java +0 -54
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkCommandLine.java +0 -227
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkCommandLineException.java +0 -25
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkExample.java +0 -86
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkMigrate.java +0 -480
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkNew.java +0 -419
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkRun.java +0 -786
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkSelfUpdate.java +0 -235
- data/embulk-cli/src/main/java/org/embulk/cli/EmbulkSubcommand.java +0 -47
- data/embulk-cli/src/main/java/org/embulk/cli/Main.java +0 -31
- data/embulk-cli/src/main/java/org/embulk/cli/parse/AbstractHelpLineDefinition.java +0 -15
- data/embulk-cli/src/main/java/org/embulk/cli/parse/CliHelpFormatterWithHelpMessages.java +0 -141
- data/embulk-cli/src/main/java/org/embulk/cli/parse/CliOptionsWithHelpMessages.java +0 -45
- data/embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineHelpRequired.java +0 -10
- data/embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineParseException.java +0 -25
- data/embulk-cli/src/main/java/org/embulk/cli/parse/EmbulkCommandLineParser.java +0 -187
- data/embulk-cli/src/main/java/org/embulk/cli/parse/HelpMessageAsCliOption.java +0 -36
- data/embulk-cli/src/main/java/org/embulk/cli/parse/HelpMessageLineDefinition.java +0 -20
- data/embulk-cli/src/main/java/org/embulk/cli/parse/OptionBehavior.java +0 -39
- data/embulk-cli/src/main/java/org/embulk/cli/parse/OptionDefinition.java +0 -120
- data/embulk-cli/src/main/sh/selfrun.sh +0 -60
- data/embulk-cli/src/test/java/org/embulk/cli/DummyMain.java +0 -23
- data/embulk-cli/src/test/java/org/embulk/cli/SelfrunTest.java +0 -296
- data/embulk-core/build.gradle +0 -83
- data/embulk-core/src/main/java/org/embulk/EmbulkEmbed.java +0 -321
- data/embulk-core/src/main/java/org/embulk/EmbulkRunner.java +0 -531
- data/embulk-core/src/main/java/org/embulk/EmbulkService.java +0 -78
- data/embulk-core/src/main/java/org/embulk/EmbulkSetup.java +0 -49
- data/embulk-core/src/main/java/org/embulk/EmbulkVersion.java +0 -109
- data/embulk-core/src/main/java/org/embulk/command/PreviewPrinter.java +0 -87
- data/embulk-core/src/main/java/org/embulk/command/TablePreviewPrinter.java +0 -107
- data/embulk-core/src/main/java/org/embulk/command/VerticalPreviewPrinter.java +0 -47
- data/embulk-core/src/main/java/org/embulk/config/CommitReport.java +0 -36
- data/embulk-core/src/main/java/org/embulk/config/Config.java +0 -15
- data/embulk-core/src/main/java/org/embulk/config/ConfigDefault.java +0 -15
- data/embulk-core/src/main/java/org/embulk/config/ConfigDiff.java +0 -32
- data/embulk-core/src/main/java/org/embulk/config/ConfigException.java +0 -26
- data/embulk-core/src/main/java/org/embulk/config/ConfigInject.java +0 -14
- data/embulk-core/src/main/java/org/embulk/config/ConfigLoader.java +0 -149
- data/embulk-core/src/main/java/org/embulk/config/ConfigSource.java +0 -34
- data/embulk-core/src/main/java/org/embulk/config/DataSource.java +0 -41
- data/embulk-core/src/main/java/org/embulk/config/DataSourceImpl.java +0 -243
- data/embulk-core/src/main/java/org/embulk/config/DataSourceSerDe.java +0 -84
- data/embulk-core/src/main/java/org/embulk/config/GenericTypeReference.java +0 -20
- data/embulk-core/src/main/java/org/embulk/config/ModelManager.java +0 -123
- data/embulk-core/src/main/java/org/embulk/config/Task.java +0 -10
- data/embulk-core/src/main/java/org/embulk/config/TaskInvocationHandler.java +0 -180
- data/embulk-core/src/main/java/org/embulk/config/TaskReport.java +0 -32
- data/embulk-core/src/main/java/org/embulk/config/TaskSerDe.java +0 -349
- data/embulk-core/src/main/java/org/embulk/config/TaskSource.java +0 -34
- data/embulk-core/src/main/java/org/embulk/config/TaskValidationException.java +0 -38
- data/embulk-core/src/main/java/org/embulk/config/TaskValidator.java +0 -24
- data/embulk-core/src/main/java/org/embulk/config/UserDataException.java +0 -4
- data/embulk-core/src/main/java/org/embulk/config/UserDataExceptions.java +0 -17
- data/embulk-core/src/main/java/org/embulk/config/YamlTagResolver.java +0 -53
- data/embulk-core/src/main/java/org/embulk/exec/BufferFileInputPlugin.java +0 -88
- data/embulk-core/src/main/java/org/embulk/exec/BulkLoader.java +0 -754
- data/embulk-core/src/main/java/org/embulk/exec/ConfigurableGuessInputPlugin.java +0 -9
- data/embulk-core/src/main/java/org/embulk/exec/ExecModule.java +0 -53
- data/embulk-core/src/main/java/org/embulk/exec/ExecutionInterruptedException.java +0 -10
- data/embulk-core/src/main/java/org/embulk/exec/ExecutionResult.java +0 -33
- data/embulk-core/src/main/java/org/embulk/exec/ExtensionServiceLoaderModule.java +0 -43
- data/embulk-core/src/main/java/org/embulk/exec/ForGuess.java +0 -16
- data/embulk-core/src/main/java/org/embulk/exec/ForSystemConfig.java +0 -16
- data/embulk-core/src/main/java/org/embulk/exec/GuessExecutor.java +0 -309
- data/embulk-core/src/main/java/org/embulk/exec/LocalExecutorPlugin.java +0 -563
- data/embulk-core/src/main/java/org/embulk/exec/LoggerProvider.java +0 -68
- data/embulk-core/src/main/java/org/embulk/exec/NoSampleException.java +0 -10
- data/embulk-core/src/main/java/org/embulk/exec/PartialExecutionException.java +0 -26
- data/embulk-core/src/main/java/org/embulk/exec/PooledBufferAllocator.java +0 -77
- data/embulk-core/src/main/java/org/embulk/exec/PreviewExecutor.java +0 -222
- data/embulk-core/src/main/java/org/embulk/exec/PreviewResult.java +0 -27
- data/embulk-core/src/main/java/org/embulk/exec/PreviewedNoticeError.java +0 -17
- data/embulk-core/src/main/java/org/embulk/exec/ResumeState.java +0 -100
- data/embulk-core/src/main/java/org/embulk/exec/SamplingParserPlugin.java +0 -215
- data/embulk-core/src/main/java/org/embulk/exec/SetCurrentThreadName.java +0 -22
- data/embulk-core/src/main/java/org/embulk/exec/SkipTransactionException.java +0 -23
- data/embulk-core/src/main/java/org/embulk/exec/SystemConfigModule.java +0 -24
- data/embulk-core/src/main/java/org/embulk/exec/TempFileAllocator.java +0 -35
- data/embulk-core/src/main/java/org/embulk/exec/TransactionStage.java +0 -27
- data/embulk-core/src/main/java/org/embulk/jruby/JRubyPluginSource.java +0 -76
- data/embulk-core/src/main/java/org/embulk/jruby/JRubyScriptingModule.java +0 -395
- data/embulk-core/src/main/java/org/embulk/plugin/BuiltinPluginSourceModule.java +0 -17
- data/embulk-core/src/main/java/org/embulk/plugin/DefaultPluginType.java +0 -50
- data/embulk-core/src/main/java/org/embulk/plugin/InjectedPluginSource.java +0 -100
- data/embulk-core/src/main/java/org/embulk/plugin/MavenPluginType.java +0 -112
- data/embulk-core/src/main/java/org/embulk/plugin/PluginClassLoader.java +0 -993
- data/embulk-core/src/main/java/org/embulk/plugin/PluginClassLoaderFactory.java +0 -16
- data/embulk-core/src/main/java/org/embulk/plugin/PluginClassLoaderModule.java +0 -102
- data/embulk-core/src/main/java/org/embulk/plugin/PluginManager.java +0 -78
- data/embulk-core/src/main/java/org/embulk/plugin/PluginSource.java +0 -49
- data/embulk-core/src/main/java/org/embulk/plugin/PluginSourceNotMatchException.java +0 -25
- data/embulk-core/src/main/java/org/embulk/plugin/PluginType.java +0 -122
- data/embulk-core/src/main/java/org/embulk/plugin/compat/InputPluginWrapper.java +0 -102
- data/embulk-core/src/main/java/org/embulk/plugin/compat/PluginWrappers.java +0 -30
- data/embulk-core/src/main/java/org/embulk/plugin/compat/TransactionalFileInputWrapper.java +0 -96
- data/embulk-core/src/main/java/org/embulk/plugin/compat/TransactionalFileOutputWrapper.java +0 -102
- data/embulk-core/src/main/java/org/embulk/plugin/compat/TransactionalPageOutputWrapper.java +0 -95
- data/embulk-core/src/main/java/org/embulk/plugin/jar/InvalidJarPluginException.java +0 -14
- data/embulk-core/src/main/java/org/embulk/plugin/jar/JarPluginLoader.java +0 -232
- data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenArtifactFinder.java +0 -134
- data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenArtifactNotFoundException.java +0 -20
- data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenPluginSource.java +0 -187
- data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenPluginSourceModule.java +0 -22
- data/embulk-core/src/main/java/org/embulk/plugin/maven/MavenRepositoryNotFoundException.java +0 -31
- data/embulk-core/src/main/java/org/embulk/spi/AbortTransactionResource.java +0 -36
- data/embulk-core/src/main/java/org/embulk/spi/Buffer.java +0 -148
- data/embulk-core/src/main/java/org/embulk/spi/BufferAllocator.java +0 -8
- data/embulk-core/src/main/java/org/embulk/spi/CloseResource.java +0 -42
- data/embulk-core/src/main/java/org/embulk/spi/Column.java +0 -95
- data/embulk-core/src/main/java/org/embulk/spi/ColumnConfig.java +0 -112
- data/embulk-core/src/main/java/org/embulk/spi/ColumnVisitor.java +0 -16
- data/embulk-core/src/main/java/org/embulk/spi/DataException.java +0 -23
- data/embulk-core/src/main/java/org/embulk/spi/DecoderPlugin.java +0 -16
- data/embulk-core/src/main/java/org/embulk/spi/EncoderPlugin.java +0 -16
- data/embulk-core/src/main/java/org/embulk/spi/Exec.java +0 -113
- data/embulk-core/src/main/java/org/embulk/spi/ExecAction.java +0 -6
- data/embulk-core/src/main/java/org/embulk/spi/ExecSession.java +0 -220
- data/embulk-core/src/main/java/org/embulk/spi/ExecutorPlugin.java +0 -19
- data/embulk-core/src/main/java/org/embulk/spi/Extension.java +0 -44
- data/embulk-core/src/main/java/org/embulk/spi/FileInput.java +0 -11
- data/embulk-core/src/main/java/org/embulk/spi/FileInputPlugin.java +0 -30
- data/embulk-core/src/main/java/org/embulk/spi/FileInputRunner.java +0 -169
- data/embulk-core/src/main/java/org/embulk/spi/FileOutput.java +0 -13
- data/embulk-core/src/main/java/org/embulk/spi/FileOutputPlugin.java +0 -28
- data/embulk-core/src/main/java/org/embulk/spi/FileOutputRunner.java +0 -199
- data/embulk-core/src/main/java/org/embulk/spi/FilterPlugin.java +0 -18
- data/embulk-core/src/main/java/org/embulk/spi/FormatterPlugin.java +0 -18
- data/embulk-core/src/main/java/org/embulk/spi/GuessPlugin.java +0 -9
- data/embulk-core/src/main/java/org/embulk/spi/InputPlugin.java +0 -33
- data/embulk-core/src/main/java/org/embulk/spi/OutputPlugin.java +0 -29
- data/embulk-core/src/main/java/org/embulk/spi/Page.java +0 -86
- data/embulk-core/src/main/java/org/embulk/spi/PageBuilder.java +0 -696
- data/embulk-core/src/main/java/org/embulk/spi/PageFormat.java +0 -47
- data/embulk-core/src/main/java/org/embulk/spi/PageOutput.java +0 -11
- data/embulk-core/src/main/java/org/embulk/spi/PageReader.java +0 -248
- data/embulk-core/src/main/java/org/embulk/spi/ParserPlugin.java +0 -17
- data/embulk-core/src/main/java/org/embulk/spi/ProcessState.java +0 -10
- data/embulk-core/src/main/java/org/embulk/spi/ProcessTask.java +0 -117
- data/embulk-core/src/main/java/org/embulk/spi/Schema.java +0 -139
- data/embulk-core/src/main/java/org/embulk/spi/SchemaConfig.java +0 -93
- data/embulk-core/src/main/java/org/embulk/spi/SchemaConfigException.java +0 -22
- data/embulk-core/src/main/java/org/embulk/spi/TaskState.java +0 -81
- data/embulk-core/src/main/java/org/embulk/spi/TempFileException.java +0 -19
- data/embulk-core/src/main/java/org/embulk/spi/TempFileSpace.java +0 -88
- data/embulk-core/src/main/java/org/embulk/spi/Transactional.java +0 -10
- data/embulk-core/src/main/java/org/embulk/spi/TransactionalFileInput.java +0 -17
- data/embulk-core/src/main/java/org/embulk/spi/TransactionalFileOutput.java +0 -19
- data/embulk-core/src/main/java/org/embulk/spi/TransactionalPageOutput.java +0 -17
- data/embulk-core/src/main/java/org/embulk/spi/json/JsonParseException.java +0 -17
- data/embulk-core/src/main/java/org/embulk/spi/json/JsonParser.java +0 -233
- data/embulk-core/src/main/java/org/embulk/spi/json/RubyValueApi.java +0 -100
- data/embulk-core/src/main/java/org/embulk/spi/time/DateTimeZoneSerDe.java +0 -55
- data/embulk-core/src/main/java/org/embulk/spi/time/Timestamp.java +0 -180
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampFormat.java +0 -158
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampFormatter.java +0 -125
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampParseException.java +0 -12
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampParser.java +0 -310
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampSerDe.java +0 -49
- data/embulk-core/src/main/java/org/embulk/spi/type/AbstractType.java +0 -58
- data/embulk-core/src/main/java/org/embulk/spi/type/BooleanType.java +0 -12
- data/embulk-core/src/main/java/org/embulk/spi/type/DoubleType.java +0 -12
- data/embulk-core/src/main/java/org/embulk/spi/type/JsonType.java +0 -14
- data/embulk-core/src/main/java/org/embulk/spi/type/LongType.java +0 -12
- data/embulk-core/src/main/java/org/embulk/spi/type/StringType.java +0 -12
- data/embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java +0 -41
- data/embulk-core/src/main/java/org/embulk/spi/type/Type.java +0 -15
- data/embulk-core/src/main/java/org/embulk/spi/type/TypeDeserializer.java +0 -45
- data/embulk-core/src/main/java/org/embulk/spi/type/Types.java +0 -16
- data/embulk-core/src/main/java/org/embulk/spi/unit/ByteSize.java +0 -156
- data/embulk-core/src/main/java/org/embulk/spi/unit/LocalFile.java +0 -106
- data/embulk-core/src/main/java/org/embulk/spi/unit/LocalFileSerDe.java +0 -113
- data/embulk-core/src/main/java/org/embulk/spi/unit/ToString.java +0 -54
- data/embulk-core/src/main/java/org/embulk/spi/unit/ToStringMap.java +0 -34
- data/embulk-core/src/main/java/org/embulk/spi/util/CharsetSerDe.java +0 -55
- data/embulk-core/src/main/java/org/embulk/spi/util/Decoders.java +0 -81
- data/embulk-core/src/main/java/org/embulk/spi/util/DynamicColumnNotFoundException.java +0 -10
- data/embulk-core/src/main/java/org/embulk/spi/util/DynamicColumnSetter.java +0 -21
- data/embulk-core/src/main/java/org/embulk/spi/util/DynamicColumnSetterFactory.java +0 -134
- data/embulk-core/src/main/java/org/embulk/spi/util/DynamicPageBuilder.java +0 -200
- data/embulk-core/src/main/java/org/embulk/spi/util/Encoders.java +0 -81
- data/embulk-core/src/main/java/org/embulk/spi/util/Executors.java +0 -93
- data/embulk-core/src/main/java/org/embulk/spi/util/FileInputInputStream.java +0 -111
- data/embulk-core/src/main/java/org/embulk/spi/util/FileOutputOutputStream.java +0 -119
- data/embulk-core/src/main/java/org/embulk/spi/util/Filters.java +0 -100
- data/embulk-core/src/main/java/org/embulk/spi/util/InputStreamFileInput.java +0 -189
- data/embulk-core/src/main/java/org/embulk/spi/util/InputStreamTransactionalFileInput.java +0 -25
- data/embulk-core/src/main/java/org/embulk/spi/util/Inputs.java +0 -65
- data/embulk-core/src/main/java/org/embulk/spi/util/LineDecoder.java +0 -157
- data/embulk-core/src/main/java/org/embulk/spi/util/LineEncoder.java +0 -123
- data/embulk-core/src/main/java/org/embulk/spi/util/ListFileInput.java +0 -52
- data/embulk-core/src/main/java/org/embulk/spi/util/Newline.java +0 -38
- data/embulk-core/src/main/java/org/embulk/spi/util/OutputStreamFileOutput.java +0 -88
- data/embulk-core/src/main/java/org/embulk/spi/util/PagePrinter.java +0 -126
- data/embulk-core/src/main/java/org/embulk/spi/util/Pages.java +0 -149
- data/embulk-core/src/main/java/org/embulk/spi/util/ResumableInputStream.java +0 -168
- data/embulk-core/src/main/java/org/embulk/spi/util/RetryExecutor.java +0 -130
- data/embulk-core/src/main/java/org/embulk/spi/util/Timestamps.java +0 -53
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/AbstractDynamicColumnSetter.java +0 -94
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/BooleanColumnSetter.java +0 -71
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/DefaultValueSetter.java +0 -20
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/DoubleColumnSetter.java +0 -68
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/JsonColumnSetter.java +0 -64
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/LongColumnSetter.java +0 -78
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/NullDefaultValueSetter.java +0 -39
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/SkipColumnSetter.java +0 -68
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/StringColumnSetter.java +0 -63
- data/embulk-core/src/main/java/org/embulk/spi/util/dynamic/TimestampColumnSetter.java +0 -72
- data/embulk-core/src/main/resources/embulk/logback-color.xml +0 -72
- data/embulk-core/src/main/resources/embulk/logback-console.xml +0 -14
- data/embulk-core/src/main/resources/embulk/logback-file.xml +0 -23
- data/embulk-core/src/main/resources/embulk/parent_first_packages.properties +0 -73
- data/embulk-core/src/main/resources/embulk/parent_first_resources.properties +0 -29
- data/embulk-core/src/test/java/org/embulk/EmbulkTestRuntime.java +0 -122
- data/embulk-core/src/test/java/org/embulk/GuiceBinder.java +0 -72
- data/embulk-core/src/test/java/org/embulk/RandomManager.java +0 -53
- data/embulk-core/src/test/java/org/embulk/TestPluginSourceModule.java +0 -23
- data/embulk-core/src/test/java/org/embulk/TestUtilityModule.java +0 -17
- data/embulk-core/src/test/java/org/embulk/config/TestConfigLoader.java +0 -66
- data/embulk-core/src/test/java/org/embulk/config/TestConfigSource.java +0 -114
- data/embulk-core/src/test/java/org/embulk/config/TestTaskSource.java +0 -70
- data/embulk-core/src/test/java/org/embulk/plugin/MockPluginSource.java +0 -58
- data/embulk-core/src/test/java/org/embulk/plugin/TestPluginType.java +0 -83
- data/embulk-core/src/test/java/org/embulk/plugin/TestPluginTypeSerDe.java +0 -67
- data/embulk-core/src/test/java/org/embulk/plugin/jar/ExampleJarSpiV0.java +0 -9
- data/embulk-core/src/test/java/org/embulk/plugin/jar/JarBuilder.java +0 -101
- data/embulk-core/src/test/java/org/embulk/plugin/jar/TestJarPluginLoader.java +0 -60
- data/embulk-core/src/test/java/org/embulk/plugin/maven/TestMavenArtifactFinder.java +0 -41
- data/embulk-core/src/test/java/org/embulk/spi/MockFileOutput.java +0 -63
- data/embulk-core/src/test/java/org/embulk/spi/MockFormatterPlugin.java +0 -108
- data/embulk-core/src/test/java/org/embulk/spi/MockParserPlugin.java +0 -80
- data/embulk-core/src/test/java/org/embulk/spi/PageTestUtils.java +0 -59
- data/embulk-core/src/test/java/org/embulk/spi/TestBuffer.java +0 -24
- data/embulk-core/src/test/java/org/embulk/spi/TestFileInputInputStream.java +0 -89
- data/embulk-core/src/test/java/org/embulk/spi/TestFileInputRunner.java +0 -199
- data/embulk-core/src/test/java/org/embulk/spi/TestFileOutputRunner.java +0 -221
- data/embulk-core/src/test/java/org/embulk/spi/TestInputStreamFileInput.java +0 -188
- data/embulk-core/src/test/java/org/embulk/spi/TestPageBuilderReader.java +0 -411
- data/embulk-core/src/test/java/org/embulk/spi/json/TestJsonParser.java +0 -102
- data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestamp.java +0 -116
- data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestampFormatterParser.java +0 -75
- data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestampFormatterParserDeprecated.java +0 -67
- data/embulk-core/src/test/java/org/embulk/spi/time/TestTimestampParser.java +0 -247
- data/embulk-core/src/test/java/org/embulk/spi/type/TestTypeSerDe.java +0 -45
- data/embulk-core/src/test/java/org/embulk/spi/unit/TestByteSize.java +0 -79
- data/embulk-core/src/test/java/org/embulk/spi/util/TestLineDecoder.java +0 -237
- data/embulk-core/src/test/java/org/embulk/spi/util/TestLineEncoder.java +0 -123
- data/embulk-core/src/test/resources/m2.test/.gitignore +0 -1
- data/embulk-core/src/test/resources/m2.test/org/embulk/example/embulk-example-maven-artifact/0.1.2/embulk-example-maven-artifact-0.1.2.jar +0 -0
- data/embulk-core/src/test/resources/m2.test/org/embulk/example/embulk-example-maven-artifact/0.1.2/embulk-example-maven-artifact-0.1.2.jar.sha1 +0 -1
- data/embulk-core/src/test/resources/m2.test/org/embulk/example/embulk-example-maven-artifact/0.1.2/embulk-example-maven-artifact-0.1.2.pom +0 -9
- data/embulk-core/src/test/resources/m2.test/org/embulk/example/embulk-example-maven-artifact/0.1.2/embulk-example-maven-artifact-0.1.2.pom.sha1 +0 -1
- data/embulk-docs/Makefile +0 -178
- data/embulk-docs/build.gradle +0 -41
- data/embulk-docs/make.bat +0 -243
- data/embulk-docs/push-gh-pages.sh +0 -49
- data/embulk-docs/src/_static/embulk-architecture.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-oneline-tr.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-oneline-wt.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-oneline.ai +0 -396
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq-tr-small.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq-tr.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq-wt.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq.ai +0 -417
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-sq.svg +0 -1
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-symbol-tr.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-symbol-wt.png +0 -0
- data/embulk-docs/src/_static/embulk-logo-v2/embulk-logo-v2-symbol.ai +1 -394
- data/embulk-docs/src/_static/embulk-logo.svg +0 -133
- data/embulk-docs/src/built-in.rst +0 -1017
- data/embulk-docs/src/conf.py +0 -260
- data/embulk-docs/src/customization.rst +0 -184
- data/embulk-docs/src/developers/index.rst +0 -45
- data/embulk-docs/src/index.rst +0 -102
- data/embulk-docs/src/logo.rst +0 -27
- data/embulk-docs/src/recipe.rst +0 -8
- data/embulk-docs/src/recipe/scheduled-csv-load-to-elasticsearch-kibana5.rst +0 -163
- data/embulk-docs/src/release.rst +0 -109
- data/embulk-docs/src/release/release-0.1.0.rst +0 -8
- data/embulk-docs/src/release/release-0.2.0.rst +0 -16
- data/embulk-docs/src/release/release-0.2.1.rst +0 -19
- data/embulk-docs/src/release/release-0.3.0.rst +0 -34
- data/embulk-docs/src/release/release-0.3.1.rst +0 -11
- data/embulk-docs/src/release/release-0.3.2.rst +0 -15
- data/embulk-docs/src/release/release-0.4.0.rst +0 -74
- data/embulk-docs/src/release/release-0.4.1.rst +0 -18
- data/embulk-docs/src/release/release-0.4.10.rst +0 -17
- data/embulk-docs/src/release/release-0.4.2.rst +0 -18
- data/embulk-docs/src/release/release-0.4.3.rst +0 -34
- data/embulk-docs/src/release/release-0.4.4.rst +0 -39
- data/embulk-docs/src/release/release-0.4.5.rst +0 -24
- data/embulk-docs/src/release/release-0.4.6.rst +0 -30
- data/embulk-docs/src/release/release-0.4.7.rst +0 -16
- data/embulk-docs/src/release/release-0.4.8.rst +0 -15
- data/embulk-docs/src/release/release-0.4.9.rst +0 -23
- data/embulk-docs/src/release/release-0.5.0.rst +0 -89
- data/embulk-docs/src/release/release-0.5.1.rst +0 -13
- data/embulk-docs/src/release/release-0.5.2.rst +0 -30
- data/embulk-docs/src/release/release-0.5.3.rst +0 -22
- data/embulk-docs/src/release/release-0.5.4.rst +0 -24
- data/embulk-docs/src/release/release-0.5.5.rst +0 -18
- data/embulk-docs/src/release/release-0.6.0.rst +0 -34
- data/embulk-docs/src/release/release-0.6.1.rst +0 -11
- data/embulk-docs/src/release/release-0.6.10.rst +0 -15
- data/embulk-docs/src/release/release-0.6.11.rst +0 -19
- data/embulk-docs/src/release/release-0.6.12.rst +0 -31
- data/embulk-docs/src/release/release-0.6.13.rst +0 -23
- data/embulk-docs/src/release/release-0.6.14.rst +0 -47
- data/embulk-docs/src/release/release-0.6.15.rst +0 -26
- data/embulk-docs/src/release/release-0.6.16.rst +0 -26
- data/embulk-docs/src/release/release-0.6.17.rst +0 -39
- data/embulk-docs/src/release/release-0.6.18.rst +0 -14
- data/embulk-docs/src/release/release-0.6.19.rst +0 -18
- data/embulk-docs/src/release/release-0.6.2.rst +0 -17
- data/embulk-docs/src/release/release-0.6.20.rst +0 -19
- data/embulk-docs/src/release/release-0.6.21.rst +0 -20
- data/embulk-docs/src/release/release-0.6.22.rst +0 -26
- data/embulk-docs/src/release/release-0.6.23.rst +0 -17
- data/embulk-docs/src/release/release-0.6.24.rst +0 -13
- data/embulk-docs/src/release/release-0.6.25.rst +0 -12
- data/embulk-docs/src/release/release-0.6.26.rst +0 -17
- data/embulk-docs/src/release/release-0.6.27.rst +0 -11
- data/embulk-docs/src/release/release-0.6.3.rst +0 -23
- data/embulk-docs/src/release/release-0.6.4.rst +0 -13
- data/embulk-docs/src/release/release-0.6.5.rst +0 -17
- data/embulk-docs/src/release/release-0.6.6.rst +0 -17
- data/embulk-docs/src/release/release-0.6.7.rst +0 -17
- data/embulk-docs/src/release/release-0.6.8.rst +0 -24
- data/embulk-docs/src/release/release-0.6.9.rst +0 -24
- data/embulk-docs/src/release/release-0.7.0.rst +0 -96
- data/embulk-docs/src/release/release-0.7.1.rst +0 -22
- data/embulk-docs/src/release/release-0.7.10.rst +0 -13
- data/embulk-docs/src/release/release-0.7.11.rst +0 -12
- data/embulk-docs/src/release/release-0.7.2.rst +0 -25
- data/embulk-docs/src/release/release-0.7.3.rst +0 -21
- data/embulk-docs/src/release/release-0.7.4.rst +0 -14
- data/embulk-docs/src/release/release-0.7.5.rst +0 -22
- data/embulk-docs/src/release/release-0.7.6.rst +0 -18
- data/embulk-docs/src/release/release-0.7.7.rst +0 -13
- data/embulk-docs/src/release/release-0.7.8.rst +0 -14
- data/embulk-docs/src/release/release-0.7.9.rst +0 -14
- data/embulk-docs/src/release/release-0.8.0.rst +0 -74
- data/embulk-docs/src/release/release-0.8.1.rst +0 -18
- data/embulk-docs/src/release/release-0.8.10.rst +0 -35
- data/embulk-docs/src/release/release-0.8.11.rst +0 -12
- data/embulk-docs/src/release/release-0.8.12.rst +0 -12
- data/embulk-docs/src/release/release-0.8.13.rst +0 -12
- data/embulk-docs/src/release/release-0.8.14.rst +0 -31
- data/embulk-docs/src/release/release-0.8.15.rst +0 -17
- data/embulk-docs/src/release/release-0.8.16.rst +0 -43
- data/embulk-docs/src/release/release-0.8.17.rst +0 -11
- data/embulk-docs/src/release/release-0.8.18.rst +0 -27
- data/embulk-docs/src/release/release-0.8.19.rst +0 -43
- data/embulk-docs/src/release/release-0.8.2.rst +0 -19
- data/embulk-docs/src/release/release-0.8.20.rst +0 -11
- data/embulk-docs/src/release/release-0.8.21.rst +0 -17
- data/embulk-docs/src/release/release-0.8.22.rst +0 -15
- data/embulk-docs/src/release/release-0.8.23.rst +0 -14
- data/embulk-docs/src/release/release-0.8.24.rst +0 -15
- data/embulk-docs/src/release/release-0.8.25.rst +0 -14
- data/embulk-docs/src/release/release-0.8.26.rst +0 -16
- data/embulk-docs/src/release/release-0.8.27.rst +0 -15
- data/embulk-docs/src/release/release-0.8.28.rst +0 -14
- data/embulk-docs/src/release/release-0.8.29.rst +0 -14
- data/embulk-docs/src/release/release-0.8.3.rst +0 -15
- data/embulk-docs/src/release/release-0.8.30.rst +0 -14
- data/embulk-docs/src/release/release-0.8.31.rst +0 -12
- data/embulk-docs/src/release/release-0.8.32.rst +0 -14
- data/embulk-docs/src/release/release-0.8.33.rst +0 -13
- data/embulk-docs/src/release/release-0.8.34.rst +0 -12
- data/embulk-docs/src/release/release-0.8.35.rst +0 -12
- data/embulk-docs/src/release/release-0.8.36.rst +0 -32
- data/embulk-docs/src/release/release-0.8.37.rst +0 -20
- data/embulk-docs/src/release/release-0.8.38.rst +0 -12
- data/embulk-docs/src/release/release-0.8.39.rst +0 -12
- data/embulk-docs/src/release/release-0.8.4.rst +0 -18
- data/embulk-docs/src/release/release-0.8.5.rst +0 -11
- data/embulk-docs/src/release/release-0.8.6.rst +0 -14
- data/embulk-docs/src/release/release-0.8.7.rst +0 -18
- data/embulk-docs/src/release/release-0.8.8.rst +0 -18
- data/embulk-docs/src/release/release-0.8.9.rst +0 -14
- data/embulk-jruby-strptime/build.gradle +0 -3
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/RubyDateParser.java +0 -121
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/StrptimeFormat.java +0 -53
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/StrptimeParser.java +0 -884
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/StrptimeToken.java +0 -111
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/TimeZoneConverter.java +0 -466
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/lexer/StrptimeLexer.flex +0 -62
- data/embulk-jruby-strptime/src/main/java/org/embulk/spi/time/lexer/StrptimeLexer.java +0 -577
- data/embulk-standards/build.gradle +0 -7
- data/embulk-standards/src/main/java/org/embulk/standards/Bzip2FileDecoderPlugin.java +0 -55
- data/embulk-standards/src/main/java/org/embulk/standards/Bzip2FileEncoderPlugin.java +0 -67
- data/embulk-standards/src/main/java/org/embulk/standards/ConfigInputPlugin.java +0 -170
- data/embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java +0 -295
- data/embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java +0 -416
- data/embulk-standards/src/main/java/org/embulk/standards/CsvTokenizer.java +0 -545
- data/embulk-standards/src/main/java/org/embulk/standards/GzipFileDecoderPlugin.java +0 -55
- data/embulk-standards/src/main/java/org/embulk/standards/GzipFileEncoderPlugin.java +0 -71
- data/embulk-standards/src/main/java/org/embulk/standards/JsonParserPlugin.java +0 -235
- data/embulk-standards/src/main/java/org/embulk/standards/LocalFileInputPlugin.java +0 -232
- data/embulk-standards/src/main/java/org/embulk/standards/LocalFileOutputPlugin.java +0 -148
- data/embulk-standards/src/main/java/org/embulk/standards/NullOutputPlugin.java +0 -59
- data/embulk-standards/src/main/java/org/embulk/standards/RemoveColumnsFilterPlugin.java +0 -268
- data/embulk-standards/src/main/java/org/embulk/standards/RenameFilterPlugin.java +0 -479
- data/embulk-standards/src/main/java/org/embulk/standards/StandardPluginExtension.java +0 -16
- data/embulk-standards/src/main/java/org/embulk/standards/StandardPluginModule.java +0 -60
- data/embulk-standards/src/main/java/org/embulk/standards/StdoutOutputPlugin.java +0 -91
- data/embulk-standards/src/main/resources/META-INF/services/org.embulk.spi.Extension +0 -1
- data/embulk-standards/src/test/java/org/embulk/standards/TestCsvFormatterPlugin.java +0 -312
- data/embulk-standards/src/test/java/org/embulk/standards/TestCsvParserPlugin.java +0 -75
- data/embulk-standards/src/test/java/org/embulk/standards/TestCsvTokenizer.java +0 -457
- data/embulk-standards/src/test/java/org/embulk/standards/TestJsonParserPlugin.java +0 -351
- data/embulk-standards/src/test/java/org/embulk/standards/TestRemoveColumnsFilterPlugin.java +0 -121
- data/embulk-standards/src/test/java/org/embulk/standards/TestRenameFilterPlugin.java +0 -1020
- data/embulk-standards/src/test/java/org/embulk/standards/guess/TestCsvAllStringsGuessPlugin.java +0 -38
- data/embulk-standards/src/test/java/org/embulk/standards/guess/TestCsvGuessPlugin.java +0 -248
- data/embulk-standards/src/test/java/org/embulk/standards/preview/TestFilePreview.java +0 -73
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row.csv +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows.csv +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed.csv +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row.csv +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header.csv +0 -3
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows.csv +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape_guessed.yml +0 -17
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_double_single_column.csv +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_double_single_column_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_double_single_column_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter_guessed.yml +0 -17
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple_guessed.yml +0 -17
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote_guessed.yml +0 -17
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_skip_suggest_if_empty_sample_records.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_skip_suggest_if_empty_sample_records_guessed.yml +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_skip_suggest_if_empty_sample_records_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header_guessed.yml +0 -12
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter_guessed.yml +0 -16
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple_guessed.yml +0 -17
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple_seed.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_sample_buffer_bytes.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_sample_buffer_bytes_exec.yml +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_sample_buffer_bytes_load.yml +0 -19
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_sample_buffer_bytes_previewed.csv +0 -1
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_simple.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_simple_load.yml +0 -19
- data/embulk-standards/src/test/resources/org/embulk/standards/preview/file/test/test_simple_previewed.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_expected.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_filter.yml +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_in.yml +0 -18
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names.yml +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names_expected.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names_in.yml +0 -17
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_unmatched_filter.yml +0 -3
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_without_unmatched_filter.yml +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove.csv +0 -5
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_expected.csv +0 -4
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_filter.yml +0 -2
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_in.yml +0 -18
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_with_unmatched_filter.yml +0 -3
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_without_unmatched_filter.yml +0 -2
- data/embulk-test/build.gradle +0 -6
- data/embulk-test/src/main/java/org/embulk/test/EmbulkTests.java +0 -75
- data/embulk-test/src/main/java/org/embulk/test/PreviewResultInputPlugin.java +0 -65
- data/embulk-test/src/main/java/org/embulk/test/TestingBulkLoader.java +0 -129
- data/embulk-test/src/main/java/org/embulk/test/TestingEmbulk.java +0 -710
- data/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/gradle/wrapper/gradle-wrapper.properties +0 -5
- data/gradlew +0 -172
- data/gradlew.bat +0 -84
- data/lib/embulk/data/bundle/.bundle/config +0 -3
- data/lib/embulk/data/bundle/.ruby-version +0 -1
- data/lib/embulk/data/bundle/Gemfile +0 -31
- data/lib/embulk/data/bundle/embulk/filter/example.rb +0 -42
- data/lib/embulk/data/bundle/embulk/input/example.rb +0 -54
- data/lib/embulk/data/bundle/embulk/output/example.rb +0 -58
- data/lib/embulk/data/new/LICENSE.txt +0 -21
- data/lib/embulk/data/new/README.md.vm +0 -106
- data/lib/embulk/data/new/gitignore.vm +0 -17
- data/lib/embulk/data/new/java/build.gradle.vm +0 -96
- data/lib/embulk/data/new/java/config/checkstyle/checkstyle.xml +0 -128
- data/lib/embulk/data/new/java/config/checkstyle/default.xml +0 -108
- data/lib/embulk/data/new/java/decoder.java.vm +0 -86
- data/lib/embulk/data/new/java/encoder.java.vm +0 -88
- data/lib/embulk/data/new/java/file_input.java.vm +0 -145
- data/lib/embulk/data/new/java/file_output.java.vm +0 -95
- data/lib/embulk/data/new/java/filter.java.vm +0 -57
- data/lib/embulk/data/new/java/formatter.java.vm +0 -55
- data/lib/embulk/data/new/java/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/lib/embulk/data/new/java/gradle/wrapper/gradle-wrapper.properties +0 -5
- data/lib/embulk/data/new/java/gradlew +0 -172
- data/lib/embulk/data/new/java/gradlew.bat +0 -84
- data/lib/embulk/data/new/java/input.java.vm +0 -89
- data/lib/embulk/data/new/java/output.java.vm +0 -79
- data/lib/embulk/data/new/java/parser.java.vm +0 -61
- data/lib/embulk/data/new/java/plugin_loader.rb.vm +0 -3
- data/lib/embulk/data/new/java/test.java.vm +0 -5
- data/lib/embulk/data/new/ruby/.ruby-version +0 -1
- data/lib/embulk/data/new/ruby/Gemfile +0 -2
- data/lib/embulk/data/new/ruby/Rakefile +0 -3
- data/lib/embulk/data/new/ruby/decoder_guess.rb.vm +0 -25
- data/lib/embulk/data/new/ruby/filter.rb.vm +0 -50
- data/lib/embulk/data/new/ruby/formatter.rb.vm +0 -49
- data/lib/embulk/data/new/ruby/gemspec.vm +0 -20
- data/lib/embulk/data/new/ruby/input.rb.vm +0 -59
- data/lib/embulk/data/new/ruby/output.rb.vm +0 -61
- data/lib/embulk/data/new/ruby/parser.rb.vm +0 -44
- data/lib/embulk/data/new/ruby/parser_guess.rb.vm +0 -65
- data/lib/embulk/data/package_data.rb +0 -59
- data/lib/embulk/runner.rb +0 -53
- data/settings.gradle +0 -8
- data/test/helper.rb +0 -23
- data/test/monkey_strptime/mri/date/test_date_strptime.rb +0 -515
- data/test/monkey_strptime/run-test.rb +0 -29
- data/test/vanilla/guess/test_csv_all_strings.rb +0 -43
- data/test/vanilla/guess/test_csv_guess.rb +0 -170
- data/test/vanilla/guess/test_schema_guess.rb +0 -47
- data/test/vanilla/guess/test_time_format_guess.rb +0 -135
- data/test/vanilla/run-test.rb +0 -14
- data/test/vanilla/time/test_timestamp_parser.rb +0 -117
@@ -1,321 +0,0 @@
|
|
1
|
-
package org.embulk;
|
2
|
-
|
3
|
-
import java.util.ArrayList;
|
4
|
-
import java.util.Arrays;
|
5
|
-
import java.util.List;
|
6
|
-
import com.google.common.base.Function;
|
7
|
-
import com.google.common.base.Throwables;
|
8
|
-
import com.google.common.collect.ImmutableList;
|
9
|
-
import com.google.common.collect.Iterables;
|
10
|
-
import com.google.inject.Injector;
|
11
|
-
import com.google.inject.Module;
|
12
|
-
import com.fasterxml.jackson.databind.ObjectMapper;
|
13
|
-
import org.embulk.config.ModelManager;
|
14
|
-
import org.embulk.config.ConfigSource;
|
15
|
-
import org.embulk.config.ConfigDiff;
|
16
|
-
import org.embulk.config.ConfigLoader;
|
17
|
-
import org.embulk.exec.BulkLoader;
|
18
|
-
import org.embulk.exec.GuessExecutor;
|
19
|
-
import org.embulk.exec.PreviewExecutor;
|
20
|
-
import org.embulk.exec.PreviewResult;
|
21
|
-
import org.embulk.exec.ExecutionResult;
|
22
|
-
import org.embulk.exec.PartialExecutionException;
|
23
|
-
import org.embulk.exec.ResumeState;
|
24
|
-
import org.embulk.exec.TransactionStage;
|
25
|
-
import org.embulk.spi.BufferAllocator;
|
26
|
-
import org.embulk.spi.ExecSession;
|
27
|
-
import org.embulk.guice.Bootstrap;
|
28
|
-
import org.embulk.guice.LifeCycleInjector;
|
29
|
-
import static com.google.common.base.Preconditions.checkState;
|
30
|
-
import static com.google.common.base.Preconditions.checkNotNull;
|
31
|
-
|
32
|
-
public class EmbulkEmbed
|
33
|
-
{
|
34
|
-
public static ConfigLoader newSystemConfigLoader()
|
35
|
-
{
|
36
|
-
return new ConfigLoader(new ModelManager(null, new ObjectMapper()));
|
37
|
-
}
|
38
|
-
|
39
|
-
public static class Bootstrap
|
40
|
-
{
|
41
|
-
private final ConfigLoader systemConfigLoader;
|
42
|
-
|
43
|
-
private ConfigSource systemConfig;
|
44
|
-
|
45
|
-
private final List<Function<? super List<Module>, ? extends Iterable<? extends Module>>> moduleOverrides;
|
46
|
-
|
47
|
-
public Bootstrap()
|
48
|
-
{
|
49
|
-
this.systemConfigLoader = newSystemConfigLoader();
|
50
|
-
this.systemConfig = systemConfigLoader.newConfigSource();
|
51
|
-
this.moduleOverrides = new ArrayList<>();
|
52
|
-
}
|
53
|
-
|
54
|
-
public ConfigLoader getSystemConfigLoader()
|
55
|
-
{
|
56
|
-
return systemConfigLoader;
|
57
|
-
}
|
58
|
-
|
59
|
-
public Bootstrap setSystemConfig(ConfigSource systemConfig)
|
60
|
-
{
|
61
|
-
this.systemConfig = systemConfig.deepCopy();
|
62
|
-
return this;
|
63
|
-
}
|
64
|
-
|
65
|
-
public Bootstrap addModules(Module... additionalModules)
|
66
|
-
{
|
67
|
-
return addModules(Arrays.asList(additionalModules));
|
68
|
-
}
|
69
|
-
|
70
|
-
public Bootstrap addModules(Iterable<? extends Module> additionalModules)
|
71
|
-
{
|
72
|
-
final List<Module> copy = ImmutableList.copyOf(additionalModules);
|
73
|
-
return overrideModules(
|
74
|
-
new Function<List<Module>, Iterable<Module>>()
|
75
|
-
{
|
76
|
-
public Iterable<Module> apply(List<Module> modules)
|
77
|
-
{
|
78
|
-
return Iterables.concat(modules, copy);
|
79
|
-
}
|
80
|
-
});
|
81
|
-
}
|
82
|
-
|
83
|
-
public Bootstrap overrideModules(Function<? super List<Module>, ? extends Iterable<? extends Module>> function)
|
84
|
-
{
|
85
|
-
moduleOverrides.add(function);
|
86
|
-
return this;
|
87
|
-
}
|
88
|
-
|
89
|
-
public EmbulkEmbed initialize()
|
90
|
-
{
|
91
|
-
return build(true);
|
92
|
-
}
|
93
|
-
|
94
|
-
public EmbulkEmbed initializeCloseable()
|
95
|
-
{
|
96
|
-
return build(false);
|
97
|
-
}
|
98
|
-
|
99
|
-
private EmbulkEmbed build(boolean destroyOnShutdownHook)
|
100
|
-
{
|
101
|
-
org.embulk.guice.Bootstrap bootstrap = new org.embulk.guice.Bootstrap()
|
102
|
-
.requireExplicitBindings(false)
|
103
|
-
.addModules(EmbulkService.standardModuleList(systemConfig));
|
104
|
-
|
105
|
-
for (Function<? super List<Module>, ? extends Iterable<? extends Module>> override : moduleOverrides) {
|
106
|
-
bootstrap = bootstrap.overrideModules(override);
|
107
|
-
}
|
108
|
-
|
109
|
-
LifeCycleInjector injector;
|
110
|
-
if (destroyOnShutdownHook) {
|
111
|
-
injector = bootstrap.initialize();
|
112
|
-
} else {
|
113
|
-
injector = bootstrap.initializeCloseable();
|
114
|
-
}
|
115
|
-
|
116
|
-
return new EmbulkEmbed(systemConfig, injector);
|
117
|
-
}
|
118
|
-
}
|
119
|
-
|
120
|
-
private final LifeCycleInjector injector;
|
121
|
-
private final BulkLoader bulkLoader;
|
122
|
-
private final GuessExecutor guessExecutor;
|
123
|
-
private final PreviewExecutor previewExecutor;
|
124
|
-
|
125
|
-
EmbulkEmbed(ConfigSource systemConfig, LifeCycleInjector injector)
|
126
|
-
{
|
127
|
-
this.injector = injector;
|
128
|
-
injector.getInstance(org.slf4j.ILoggerFactory.class);
|
129
|
-
this.bulkLoader = injector.getInstance(BulkLoader.class);
|
130
|
-
this.guessExecutor = injector.getInstance(GuessExecutor.class);
|
131
|
-
this.previewExecutor = injector.getInstance(PreviewExecutor.class);
|
132
|
-
}
|
133
|
-
|
134
|
-
public Injector getInjector()
|
135
|
-
{
|
136
|
-
return injector;
|
137
|
-
}
|
138
|
-
|
139
|
-
public ModelManager getModelManager()
|
140
|
-
{
|
141
|
-
return injector.getInstance(ModelManager.class);
|
142
|
-
}
|
143
|
-
|
144
|
-
public BufferAllocator getBufferAllocator()
|
145
|
-
{
|
146
|
-
return injector.getInstance(BufferAllocator.class);
|
147
|
-
}
|
148
|
-
|
149
|
-
public ConfigLoader newConfigLoader()
|
150
|
-
{
|
151
|
-
return injector.getInstance(ConfigLoader.class);
|
152
|
-
}
|
153
|
-
|
154
|
-
public ConfigDiff guess(ConfigSource config)
|
155
|
-
{
|
156
|
-
ExecSession exec = newExecSession(config);
|
157
|
-
try {
|
158
|
-
return guessExecutor.guess(exec, config);
|
159
|
-
}
|
160
|
-
finally {
|
161
|
-
exec.cleanup();
|
162
|
-
}
|
163
|
-
}
|
164
|
-
|
165
|
-
public PreviewResult preview(ConfigSource config)
|
166
|
-
{
|
167
|
-
ExecSession exec = newExecSession(config);
|
168
|
-
try {
|
169
|
-
return previewExecutor.preview(exec, config);
|
170
|
-
}
|
171
|
-
finally {
|
172
|
-
exec.cleanup();
|
173
|
-
}
|
174
|
-
}
|
175
|
-
|
176
|
-
public ExecutionResult run(ConfigSource config)
|
177
|
-
{
|
178
|
-
ExecSession exec = newExecSession(config);
|
179
|
-
try {
|
180
|
-
return bulkLoader.run(exec, config);
|
181
|
-
}
|
182
|
-
catch (PartialExecutionException partial) {
|
183
|
-
try {
|
184
|
-
bulkLoader.cleanup(config, partial.getResumeState());
|
185
|
-
} catch (Throwable ex) {
|
186
|
-
partial.addSuppressed(ex);
|
187
|
-
}
|
188
|
-
throw partial;
|
189
|
-
}
|
190
|
-
finally {
|
191
|
-
try {
|
192
|
-
exec.cleanup();
|
193
|
-
}
|
194
|
-
catch (Exception ex) {
|
195
|
-
// TODO add this exception to ExecutionResult.getIgnoredExceptions
|
196
|
-
// or partial.addSuppressed
|
197
|
-
ex.printStackTrace(System.err);
|
198
|
-
}
|
199
|
-
}
|
200
|
-
}
|
201
|
-
|
202
|
-
public ResumableResult runResumable(ConfigSource config)
|
203
|
-
{
|
204
|
-
ExecSession exec = newExecSession(config);
|
205
|
-
try {
|
206
|
-
ExecutionResult result;
|
207
|
-
try {
|
208
|
-
result = bulkLoader.run(exec, config);
|
209
|
-
} catch (PartialExecutionException partial) {
|
210
|
-
return new ResumableResult(partial);
|
211
|
-
}
|
212
|
-
return new ResumableResult(result);
|
213
|
-
}
|
214
|
-
finally {
|
215
|
-
try {
|
216
|
-
exec.cleanup();
|
217
|
-
}
|
218
|
-
catch (Exception ex) {
|
219
|
-
// TODO add this exception to ExecutionResult.getIgnoredExceptions
|
220
|
-
// or partial.addSuppressed
|
221
|
-
ex.printStackTrace(System.err);
|
222
|
-
}
|
223
|
-
}
|
224
|
-
}
|
225
|
-
|
226
|
-
private ExecSession newExecSession(ConfigSource config)
|
227
|
-
{
|
228
|
-
ConfigSource execConfig = config.deepCopy().getNestedOrGetEmpty("exec");
|
229
|
-
return ExecSession.builder(injector).fromExecConfig(execConfig).build();
|
230
|
-
}
|
231
|
-
|
232
|
-
public ResumeStateAction resumeState(ConfigSource config, ConfigSource resumeStateConfig)
|
233
|
-
{
|
234
|
-
ResumeState resumeState = resumeStateConfig.loadConfig(ResumeState.class);
|
235
|
-
return new ResumeStateAction(config, resumeState);
|
236
|
-
}
|
237
|
-
|
238
|
-
public static class ResumableResult
|
239
|
-
{
|
240
|
-
private final ExecutionResult successfulResult;
|
241
|
-
private final PartialExecutionException partialExecutionException;
|
242
|
-
|
243
|
-
public ResumableResult(PartialExecutionException partialExecutionException)
|
244
|
-
{
|
245
|
-
this.successfulResult = null;
|
246
|
-
this.partialExecutionException = checkNotNull(partialExecutionException);
|
247
|
-
}
|
248
|
-
|
249
|
-
public ResumableResult(ExecutionResult successfulResult)
|
250
|
-
{
|
251
|
-
this.successfulResult = checkNotNull(successfulResult);
|
252
|
-
this.partialExecutionException = null;
|
253
|
-
}
|
254
|
-
|
255
|
-
public boolean isSuccessful()
|
256
|
-
{
|
257
|
-
return successfulResult != null;
|
258
|
-
}
|
259
|
-
|
260
|
-
public ExecutionResult getSuccessfulResult()
|
261
|
-
{
|
262
|
-
checkState(successfulResult != null);
|
263
|
-
return successfulResult;
|
264
|
-
}
|
265
|
-
|
266
|
-
public Throwable getCause()
|
267
|
-
{
|
268
|
-
checkState(partialExecutionException != null);
|
269
|
-
return partialExecutionException.getCause();
|
270
|
-
}
|
271
|
-
|
272
|
-
public ResumeState getResumeState()
|
273
|
-
{
|
274
|
-
checkState(partialExecutionException != null);
|
275
|
-
return partialExecutionException.getResumeState();
|
276
|
-
}
|
277
|
-
|
278
|
-
public TransactionStage getTransactionStage()
|
279
|
-
{
|
280
|
-
return partialExecutionException.getTransactionStage();
|
281
|
-
}
|
282
|
-
}
|
283
|
-
|
284
|
-
public class ResumeStateAction
|
285
|
-
{
|
286
|
-
private final ConfigSource config;
|
287
|
-
private final ResumeState resumeState;
|
288
|
-
|
289
|
-
public ResumeStateAction(ConfigSource config, ResumeState resumeState)
|
290
|
-
{
|
291
|
-
this.config = config;
|
292
|
-
this.resumeState = resumeState;
|
293
|
-
}
|
294
|
-
|
295
|
-
public ResumableResult resume()
|
296
|
-
{
|
297
|
-
ExecutionResult result;
|
298
|
-
try {
|
299
|
-
result = bulkLoader.resume(config, resumeState);
|
300
|
-
} catch (PartialExecutionException partial) {
|
301
|
-
return new ResumableResult(partial);
|
302
|
-
}
|
303
|
-
return new ResumableResult(result);
|
304
|
-
}
|
305
|
-
|
306
|
-
public void cleanup()
|
307
|
-
{
|
308
|
-
bulkLoader.cleanup(config, resumeState);
|
309
|
-
}
|
310
|
-
}
|
311
|
-
|
312
|
-
public void destroy()
|
313
|
-
{
|
314
|
-
try {
|
315
|
-
injector.destroy();
|
316
|
-
}
|
317
|
-
catch (Exception ex) {
|
318
|
-
throw Throwables.propagate(ex);
|
319
|
-
}
|
320
|
-
}
|
321
|
-
}
|
@@ -1,531 +0,0 @@
|
|
1
|
-
package org.embulk;
|
2
|
-
|
3
|
-
import java.io.IOException;
|
4
|
-
import java.io.OutputStream;
|
5
|
-
import java.nio.charset.StandardCharsets;
|
6
|
-
import java.nio.file.Files;
|
7
|
-
import java.nio.file.Path;
|
8
|
-
import java.nio.file.Paths;
|
9
|
-
import java.nio.file.StandardOpenOption;
|
10
|
-
import java.util.Collections;
|
11
|
-
import java.util.List;
|
12
|
-
import java.util.Map;
|
13
|
-
import java.util.regex.Pattern;
|
14
|
-
import org.embulk.command.PreviewPrinter;
|
15
|
-
import org.embulk.command.TablePreviewPrinter;
|
16
|
-
import org.embulk.command.VerticalPreviewPrinter;
|
17
|
-
import org.embulk.config.ConfigDiff;
|
18
|
-
import org.embulk.config.ConfigException;
|
19
|
-
import org.embulk.config.ConfigSource;
|
20
|
-
import org.embulk.config.DataSource;
|
21
|
-
import org.embulk.config.ModelManager;
|
22
|
-
import org.embulk.exec.ExecutionResult;
|
23
|
-
import org.embulk.exec.PreviewResult;
|
24
|
-
import org.embulk.exec.ResumeState;
|
25
|
-
import org.embulk.exec.TransactionStage;
|
26
|
-
import org.jruby.embed.LocalContextScope;
|
27
|
-
import org.jruby.embed.LocalVariableBehavior;
|
28
|
-
import org.jruby.embed.ScriptingContainer;
|
29
|
-
import org.slf4j.Logger;
|
30
|
-
import org.slf4j.LoggerFactory;
|
31
|
-
|
32
|
-
/**
|
33
|
-
* EmbulkRunner runs the guess, preview, or run subcommand.
|
34
|
-
*
|
35
|
-
* NOTE: Developers should not depend on this EmbulkRunner class. This class is created tentatively, and may be
|
36
|
-
* re-implemented again in a different style.
|
37
|
-
*/
|
38
|
-
public class EmbulkRunner
|
39
|
-
{
|
40
|
-
// |EmbulkSetup.setup| initializes:
|
41
|
-
// new EmbulkRunner(embed)
|
42
|
-
public EmbulkRunner(final EmbulkEmbed embed)
|
43
|
-
{
|
44
|
-
this.embed = embed; // org.embulk.EmbulkEmbed
|
45
|
-
}
|
46
|
-
|
47
|
-
/**
|
48
|
-
* Runs the guess subcommand.
|
49
|
-
*
|
50
|
-
* It receives Java Paths to be called from Java EmbulkRun in embulk-cli.
|
51
|
-
*/
|
52
|
-
public void guess(final Path configFilePath, final Path outputPath)
|
53
|
-
{
|
54
|
-
// TODO: Utilize |templateParams| and |templateIncludePath|.
|
55
|
-
// They have not been used from embulk-cli while |template_params| and |template_include_path| are implemented
|
56
|
-
// in Ruby Embulk::EmbulkRunner.
|
57
|
-
final ConfigSource configSource;
|
58
|
-
try {
|
59
|
-
configSource = readConfig(configFilePath, Collections.<String, Object>emptyMap(), null);
|
60
|
-
}
|
61
|
-
catch (IOException ex) {
|
62
|
-
throw new RuntimeException(ex);
|
63
|
-
}
|
64
|
-
|
65
|
-
try {
|
66
|
-
guessInternal(configSource, outputPath);
|
67
|
-
}
|
68
|
-
catch (IOException ex) {
|
69
|
-
throw new RuntimeException(ex);
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
/**
|
74
|
-
* Runs the guess subcommand.
|
75
|
-
*
|
76
|
-
* It receives Strings as parameters to be called from Ruby (embulk/runner.rb).
|
77
|
-
*/
|
78
|
-
public void guess(final String configFilePathString, final String outputPathString)
|
79
|
-
{
|
80
|
-
final Path outputPath = (outputPathString == null ? null : Paths.get(outputPathString));
|
81
|
-
guess(Paths.get(configFilePathString), outputPath);
|
82
|
-
}
|
83
|
-
|
84
|
-
/**
|
85
|
-
* Runs the guess subcommand.
|
86
|
-
*
|
87
|
-
* It receives a ConfigSource and a String as parameters to be called from Ruby (embulk/runner.rb).
|
88
|
-
*/
|
89
|
-
public void guess(final ConfigSource configSource, final String outputPathString)
|
90
|
-
{
|
91
|
-
final Path outputPath = (outputPathString == null ? null : Paths.get(outputPathString));
|
92
|
-
try {
|
93
|
-
guessInternal(configSource, outputPath);
|
94
|
-
}
|
95
|
-
catch (IOException ex) {
|
96
|
-
throw new RuntimeException(ex);
|
97
|
-
}
|
98
|
-
}
|
99
|
-
|
100
|
-
/**
|
101
|
-
* Runs the guess subcommand.
|
102
|
-
*
|
103
|
-
* It receives a Java Path and a String to be called from Java's EmbulkRun in embulk-cli.
|
104
|
-
*/
|
105
|
-
public void preview(final Path configFilePath, final String format)
|
106
|
-
{
|
107
|
-
// TODO: Utilize |templateParams| and |templateIncludePath|.
|
108
|
-
// They have not been used from embulk-cli while |template_params| and |template_include_path| are implemented
|
109
|
-
// in Ruby Embulk::EmbulkRunner.
|
110
|
-
final ConfigSource configSource;
|
111
|
-
try {
|
112
|
-
configSource = readConfig(configFilePath, Collections.<String, Object>emptyMap(), null);
|
113
|
-
}
|
114
|
-
catch (IOException ex) {
|
115
|
-
throw new RuntimeException(ex);
|
116
|
-
}
|
117
|
-
|
118
|
-
try {
|
119
|
-
previewInternal(configSource, format);
|
120
|
-
}
|
121
|
-
catch (IOException ex) {
|
122
|
-
throw new RuntimeException(ex);
|
123
|
-
}
|
124
|
-
}
|
125
|
-
|
126
|
-
/**
|
127
|
-
* Runs the preview subcommand.
|
128
|
-
*
|
129
|
-
* It receives Strings as parameters to be called from Ruby (embulk/runner.rb).
|
130
|
-
*/
|
131
|
-
public void preview(final String configFilePathString, final String format)
|
132
|
-
{
|
133
|
-
preview(Paths.get(configFilePathString), format);
|
134
|
-
}
|
135
|
-
|
136
|
-
/**
|
137
|
-
* Runs the preview subcommand.
|
138
|
-
*
|
139
|
-
* It receives a ConfigSource and a String as parameters to be called from Ruby (embulk/runner.rb).
|
140
|
-
*/
|
141
|
-
public void preview(final ConfigSource configSource, final String format)
|
142
|
-
{
|
143
|
-
try {
|
144
|
-
previewInternal(configSource, format);
|
145
|
-
}
|
146
|
-
catch (IOException ex) {
|
147
|
-
throw new RuntimeException(ex);
|
148
|
-
}
|
149
|
-
}
|
150
|
-
|
151
|
-
/**
|
152
|
-
* Runs the run subcommand.
|
153
|
-
*
|
154
|
-
* It receives Java Paths to be called from Java EmbulkRun in embulk-cli.
|
155
|
-
*/
|
156
|
-
public void run(
|
157
|
-
final Path configFilePath,
|
158
|
-
final Path configDiffPath,
|
159
|
-
final Path outputPath,
|
160
|
-
final Path resumeStatePath)
|
161
|
-
{
|
162
|
-
// TODO: Utilize |templateParams| and |templateIncludePath|.
|
163
|
-
// They have not been used from embulk-cli while |template_params| and |template_include_path| are implemented
|
164
|
-
// in Ruby Embulk::EmbulkRunner.
|
165
|
-
final ConfigSource configSource;
|
166
|
-
try {
|
167
|
-
configSource = readConfig(configFilePath, Collections.<String, Object>emptyMap(), null);
|
168
|
-
}
|
169
|
-
catch (IOException ex) {
|
170
|
-
throw new RuntimeException(ex);
|
171
|
-
}
|
172
|
-
|
173
|
-
try {
|
174
|
-
runInternal(configSource, configDiffPath, outputPath, resumeStatePath);
|
175
|
-
}
|
176
|
-
catch (IOException ex) {
|
177
|
-
throw new RuntimeException(ex);
|
178
|
-
}
|
179
|
-
}
|
180
|
-
|
181
|
-
/**
|
182
|
-
* Runs the run subcommand.
|
183
|
-
*
|
184
|
-
* It receives Strings as parameters to be called from Ruby (embulk/runner.rb).
|
185
|
-
*/
|
186
|
-
public void run(final String configFilePathString,
|
187
|
-
final String configDiffPathString,
|
188
|
-
final String outputPathString,
|
189
|
-
final String resumeStatePathString)
|
190
|
-
{
|
191
|
-
final Path configDiffPath = (configDiffPathString == null ? null : Paths.get(configDiffPathString));
|
192
|
-
final Path outputPath = (outputPathString == null ? null : Paths.get(outputPathString));
|
193
|
-
final Path resumeStatePath = (resumeStatePathString == null ? null : Paths.get(resumeStatePathString));
|
194
|
-
run(Paths.get(configFilePathString), configDiffPath, outputPath, resumeStatePath);
|
195
|
-
}
|
196
|
-
|
197
|
-
/**
|
198
|
-
* Runs the run subcommand.
|
199
|
-
*
|
200
|
-
* It receives a ConfigSource and a String as parameters to be called from Ruby (embulk/runner.rb).
|
201
|
-
*/
|
202
|
-
public void run(final ConfigSource configSource,
|
203
|
-
final String configDiffPathString,
|
204
|
-
final String outputPathString,
|
205
|
-
final String resumeStatePathString)
|
206
|
-
{
|
207
|
-
final Path configDiffPath = (configDiffPathString == null ? null : Paths.get(configDiffPathString));
|
208
|
-
final Path outputPath = (outputPathString == null ? null : Paths.get(outputPathString));
|
209
|
-
final Path resumeStatePath = (resumeStatePathString == null ? null : Paths.get(resumeStatePathString));
|
210
|
-
try {
|
211
|
-
runInternal(configSource, configDiffPath, outputPath, resumeStatePath);
|
212
|
-
}
|
213
|
-
catch (IOException ex) {
|
214
|
-
throw new RuntimeException(ex);
|
215
|
-
}
|
216
|
-
}
|
217
|
-
|
218
|
-
private void guessInternal(final ConfigSource configSource, final Path outputPath)
|
219
|
-
throws IOException
|
220
|
-
{
|
221
|
-
try {
|
222
|
-
checkFileWritable(outputPath);
|
223
|
-
}
|
224
|
-
catch (IOException ex) {
|
225
|
-
throw new RuntimeException("Not writable: " + outputPath.toString());
|
226
|
-
}
|
227
|
-
|
228
|
-
final ConfigDiff configDiff = this.embed.guess(configSource);
|
229
|
-
final ConfigSource guessedConfigSource = configSource.merge(configDiff);
|
230
|
-
final String yaml = writeConfig(outputPath, guessedConfigSource);
|
231
|
-
System.err.println(yaml);
|
232
|
-
if (outputPath != null) {
|
233
|
-
System.out.println("Created '" + outputPath + "' file.");
|
234
|
-
}
|
235
|
-
else {
|
236
|
-
System.out.println("Use -o PATH option to write the guessed config file to a file.");
|
237
|
-
}
|
238
|
-
}
|
239
|
-
|
240
|
-
private void previewInternal(final ConfigSource configSource, final String format)
|
241
|
-
throws IOException
|
242
|
-
{
|
243
|
-
final PreviewResult previewResult = this.embed.preview(configSource);
|
244
|
-
final ModelManager modelManager = this.embed.getModelManager();
|
245
|
-
|
246
|
-
final PreviewPrinter printer;
|
247
|
-
switch (format != null ? format : "table") {
|
248
|
-
case "table":
|
249
|
-
printer = new TablePreviewPrinter(System.out, modelManager, previewResult.getSchema());
|
250
|
-
break;
|
251
|
-
case "vertical":
|
252
|
-
printer = new VerticalPreviewPrinter(System.out, modelManager, previewResult.getSchema());
|
253
|
-
break;
|
254
|
-
default:
|
255
|
-
throw new IllegalArgumentException(
|
256
|
-
"Unknown preview output format '" + format + "'. Supported formats: table, vertical");
|
257
|
-
}
|
258
|
-
|
259
|
-
printer.printAllPages(previewResult.getPages());
|
260
|
-
printer.finish();
|
261
|
-
}
|
262
|
-
|
263
|
-
private void runInternal(
|
264
|
-
final ConfigSource originalConfigSource,
|
265
|
-
final Path configDiffPath,
|
266
|
-
final Path outputPath, // deprecated
|
267
|
-
final Path resumeStatePath)
|
268
|
-
throws IOException
|
269
|
-
{
|
270
|
-
try {
|
271
|
-
checkFileWritable(outputPath);
|
272
|
-
}
|
273
|
-
catch (IOException ex) {
|
274
|
-
throw new RuntimeException("Not writable: " + outputPath.toString());
|
275
|
-
}
|
276
|
-
try {
|
277
|
-
checkFileWritable(configDiffPath);
|
278
|
-
}
|
279
|
-
catch (IOException ex) {
|
280
|
-
throw new RuntimeException("Not writable: " + configDiffPath.toString());
|
281
|
-
}
|
282
|
-
try {
|
283
|
-
checkFileWritable(resumeStatePath);
|
284
|
-
}
|
285
|
-
catch (IOException ex) {
|
286
|
-
throw new RuntimeException("Not writable: " + resumeStatePath.toString());
|
287
|
-
}
|
288
|
-
|
289
|
-
final ConfigSource configSource;
|
290
|
-
if (configDiffPath != null && Files.size(configDiffPath) > 0L) {
|
291
|
-
configSource = originalConfigSource.merge(
|
292
|
-
readConfig(configDiffPath, Collections.<String, Object>emptyMap(), null));
|
293
|
-
}
|
294
|
-
else {
|
295
|
-
configSource = originalConfigSource;
|
296
|
-
}
|
297
|
-
|
298
|
-
final ConfigSource resumeConfig;
|
299
|
-
if (resumeStatePath != null) {
|
300
|
-
ConfigSource resumeConfigTemp = null;
|
301
|
-
try {
|
302
|
-
resumeConfigTemp = readYamlConfigFile(resumeStatePath);
|
303
|
-
}
|
304
|
-
catch (Throwable ex) {
|
305
|
-
// TODO log?
|
306
|
-
resumeConfigTemp = null;
|
307
|
-
}
|
308
|
-
if (resumeConfigTemp == null || resumeConfigTemp.isEmpty()) {
|
309
|
-
resumeConfig = null;
|
310
|
-
}
|
311
|
-
else {
|
312
|
-
resumeConfig = resumeConfigTemp;
|
313
|
-
}
|
314
|
-
}
|
315
|
-
else {
|
316
|
-
resumeConfig = null;
|
317
|
-
}
|
318
|
-
|
319
|
-
final EmbulkEmbed.ResumableResult resumableResult;
|
320
|
-
final ExecutionResult executionResultTemp;
|
321
|
-
if (resumeConfig != null) {
|
322
|
-
resumableResult = this.embed.resumeState(configSource, resumeConfig).resume();
|
323
|
-
executionResultTemp = null;
|
324
|
-
}
|
325
|
-
else if (resumeStatePath != null) {
|
326
|
-
resumableResult = this.embed.runResumable(configSource);
|
327
|
-
executionResultTemp = null;
|
328
|
-
}
|
329
|
-
else {
|
330
|
-
resumableResult = null;
|
331
|
-
executionResultTemp = this.embed.run(configSource);
|
332
|
-
}
|
333
|
-
|
334
|
-
final ExecutionResult executionResult;
|
335
|
-
if (executionResultTemp == null) {
|
336
|
-
if (!resumableResult.isSuccessful()) {
|
337
|
-
if (resumableResult.getTransactionStage().isBefore(TransactionStage.RUN)) {
|
338
|
-
// retry without resume state file if no tasks started yet
|
339
|
-
// delete resume file
|
340
|
-
if (resumeStatePath != null) {
|
341
|
-
try {
|
342
|
-
Files.deleteIfExists(resumeStatePath);
|
343
|
-
}
|
344
|
-
catch (Throwable ex) {
|
345
|
-
System.err.println("Failed to delete: " + resumeStatePath.toString());
|
346
|
-
}
|
347
|
-
}
|
348
|
-
}
|
349
|
-
else {
|
350
|
-
rootLogger.info("Writing resume state to '" + resumeStatePath.toString() + "'");
|
351
|
-
try {
|
352
|
-
writeResumeState(resumeStatePath, resumableResult.getResumeState());
|
353
|
-
}
|
354
|
-
catch (IOException ex) {
|
355
|
-
throw new RuntimeException(ex);
|
356
|
-
}
|
357
|
-
rootLogger.info("Resume state is written. Run the transaction again with -r option to resume or use \"cleanup\" subcommand to delete intermediate data.");
|
358
|
-
}
|
359
|
-
throw new RuntimeException(resumableResult.getCause());
|
360
|
-
}
|
361
|
-
executionResult = resumableResult.getSuccessfulResult();
|
362
|
-
}
|
363
|
-
else {
|
364
|
-
executionResult = executionResultTemp;
|
365
|
-
}
|
366
|
-
|
367
|
-
// delete resume file
|
368
|
-
if (resumeStatePath != null) {
|
369
|
-
try {
|
370
|
-
Files.deleteIfExists(resumeStatePath);
|
371
|
-
}
|
372
|
-
catch (Throwable ex) {
|
373
|
-
System.err.println("Failed to delete: " + resumeStatePath.toString());
|
374
|
-
}
|
375
|
-
}
|
376
|
-
|
377
|
-
final ConfigDiff configDiff = executionResult.getConfigDiff();
|
378
|
-
rootLogger.info("Committed.");
|
379
|
-
rootLogger.info("Next config diff: " + configDiff.toString());
|
380
|
-
|
381
|
-
writeConfig(configDiffPath, configDiff);
|
382
|
-
writeConfig(outputPath, configSource.merge(configDiff)); // deprecated
|
383
|
-
}
|
384
|
-
|
385
|
-
// def resume_state(config, options={})
|
386
|
-
// configSource = read_config(config, options)
|
387
|
-
// Resumed.new(self, DataSource.from_java(configSource), options)
|
388
|
-
// end
|
389
|
-
|
390
|
-
private ConfigSource readConfig(
|
391
|
-
final Path configFilePath,
|
392
|
-
final Map<String, Object> templateParams,
|
393
|
-
final String templateIncludePath)
|
394
|
-
throws IOException
|
395
|
-
{
|
396
|
-
final String configString = configFilePath.toString();
|
397
|
-
if (EXT_YAML_LIQUID.matcher(configFilePath.toString()).matches()) {
|
398
|
-
return this.embed.newConfigLoader().fromYamlString(
|
399
|
-
runLiquid(new String(Files.readAllBytes(configFilePath), StandardCharsets.UTF_8),
|
400
|
-
templateParams,
|
401
|
-
(templateIncludePath == null
|
402
|
-
? configFilePath.toAbsolutePath().getParent().toString()
|
403
|
-
: templateIncludePath)));
|
404
|
-
}
|
405
|
-
else if (EXT_YAML.matcher(configFilePath.toString()).matches()) {
|
406
|
-
return this.embed.newConfigLoader().fromYamlString(
|
407
|
-
new String(Files.readAllBytes(configFilePath), StandardCharsets.UTF_8));
|
408
|
-
}
|
409
|
-
else {
|
410
|
-
throw new ConfigException(
|
411
|
-
"Unsupported file extension. Supported file extensions are .yml and .yml.liquid: " +
|
412
|
-
configFilePath.toString());
|
413
|
-
}
|
414
|
-
}
|
415
|
-
|
416
|
-
private ConfigSource readYamlConfigFile(final Path path)
|
417
|
-
throws IOException
|
418
|
-
{
|
419
|
-
return this.embed.newConfigLoader().fromYamlString(
|
420
|
-
new String(Files.readAllBytes(path), StandardCharsets.UTF_8));
|
421
|
-
}
|
422
|
-
|
423
|
-
private String runLiquid(
|
424
|
-
final String templateSource,
|
425
|
-
final Map<String, Object> templateParams,
|
426
|
-
final String templateIncludePath)
|
427
|
-
{
|
428
|
-
// TODO: Check if it is required to process JRuby options.
|
429
|
-
// Not |LocalContextScope.SINGLETON| to narrow down considerations.
|
430
|
-
final ScriptingContainer localJRubyContainer =
|
431
|
-
new ScriptingContainer(LocalContextScope.SINGLETHREAD, LocalVariableBehavior.PERSISTENT);
|
432
|
-
|
433
|
-
localJRubyContainer.runScriptlet("require 'liquid'");
|
434
|
-
|
435
|
-
localJRubyContainer.put("__internal_liquid_template_source__", templateSource);
|
436
|
-
localJRubyContainer.runScriptlet("template = Liquid::Template.parse(__internal_liquid_template_source__, :error_mode => :strict)");
|
437
|
-
localJRubyContainer.remove("__internal_liquid_template_source__");
|
438
|
-
|
439
|
-
if (templateIncludePath != null) {
|
440
|
-
localJRubyContainer.put("__internal_liquid_template_include_path_java__", templateIncludePath);
|
441
|
-
localJRubyContainer.runScriptlet("__internal_liquid_template_include_path__ = File.expand_path(__internal_liquid_template_include_path_java__ || File.dirname(config)) unless __internal_liquid_template_include_path_java__ == false");
|
442
|
-
localJRubyContainer.runScriptlet("template.registers[:file_system] = Liquid::LocalFileSystem.new(__internal_liquid_template_include_path__, \"_%s.yml.liquid\")");
|
443
|
-
localJRubyContainer.remove("__internal_liquid_template_include_path__");
|
444
|
-
}
|
445
|
-
|
446
|
-
// TODO: Convert |templateParams| recursively to Ruby's Hash.
|
447
|
-
localJRubyContainer.put("__internal_liquid_template_params__", templateParams);
|
448
|
-
localJRubyContainer.runScriptlet("__internal_liquid_template_data__ = { 'env' => ENV.to_h }.merge(__internal_liquid_template_params__)");
|
449
|
-
localJRubyContainer.remove("__internal_liquid_template_params__");
|
450
|
-
|
451
|
-
final Object renderedObject =
|
452
|
-
localJRubyContainer.runScriptlet("template.render(__internal_liquid_template_data__)");
|
453
|
-
return renderedObject.toString();
|
454
|
-
}
|
455
|
-
|
456
|
-
private boolean checkFileWritable(final Path path)
|
457
|
-
throws IOException
|
458
|
-
{
|
459
|
-
if (path != null) {
|
460
|
-
// Open file with append mode and do nothing.
|
461
|
-
// If file is not writable, it throws an exception.
|
462
|
-
// NOTE: |Files.isWritable| does not work for the purpose as it expects the file exists.
|
463
|
-
// Using |Files.newOutputStream| for the binary mode.
|
464
|
-
try (final OutputStream output =
|
465
|
-
Files.newOutputStream(path, StandardOpenOption.APPEND, StandardOpenOption.CREATE)) {
|
466
|
-
;
|
467
|
-
}
|
468
|
-
}
|
469
|
-
return true;
|
470
|
-
}
|
471
|
-
|
472
|
-
private String writeConfig(final Path path, final DataSource modelObject)
|
473
|
-
throws IOException
|
474
|
-
{
|
475
|
-
final String yamlString = dumpDataSourceInYaml(modelObject);
|
476
|
-
if (path != null) {
|
477
|
-
Files.write(path, yamlString.getBytes(), StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);
|
478
|
-
}
|
479
|
-
return yamlString;
|
480
|
-
}
|
481
|
-
|
482
|
-
private String writeResumeState(final Path path, final ResumeState modelObject)
|
483
|
-
throws IOException
|
484
|
-
{
|
485
|
-
final String yamlString = dumpResumeStateInYaml(modelObject);
|
486
|
-
if (path != null) {
|
487
|
-
Files.write(path, yamlString.getBytes(), StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);
|
488
|
-
}
|
489
|
-
return yamlString;
|
490
|
-
}
|
491
|
-
|
492
|
-
private String dumpDataSourceInYaml(final DataSource modelObject)
|
493
|
-
{
|
494
|
-
final ModelManager modelManager = this.embed.getModelManager();
|
495
|
-
final Object object = modelManager.readObject(Object.class, modelManager.writeObject(modelObject));
|
496
|
-
return (new org.yaml.snakeyaml.Yaml()).dump(object);
|
497
|
-
}
|
498
|
-
|
499
|
-
private String dumpResumeStateInYaml(final ResumeState modelObject)
|
500
|
-
{
|
501
|
-
final ModelManager modelManager = this.embed.getModelManager();
|
502
|
-
final Object object = modelManager.readObject(Object.class, modelManager.writeObject(modelObject));
|
503
|
-
return (new org.yaml.snakeyaml.Yaml()).dump(object);
|
504
|
-
}
|
505
|
-
|
506
|
-
// class Runnable
|
507
|
-
// def initialize(runner, config, options)
|
508
|
-
// @runner = runner
|
509
|
-
// @config = config
|
510
|
-
// @options = options
|
511
|
-
// end
|
512
|
-
//
|
513
|
-
// attr_reader :config
|
514
|
-
//
|
515
|
-
// def preview(options={})
|
516
|
-
// @runner.preview(@config, @options.merge(options))
|
517
|
-
// end
|
518
|
-
//
|
519
|
-
// def run(options={})
|
520
|
-
// @runner.run(@config, @options.merge(options))
|
521
|
-
// end
|
522
|
-
// end
|
523
|
-
|
524
|
-
// NOTE: The root logger directly from |LoggerFactory|, not from |Exec.getLogger| as it's outside of |Exec.doWith|.
|
525
|
-
private static final Logger rootLogger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
|
526
|
-
|
527
|
-
private final Pattern EXT_YAML = Pattern.compile(".*\\.ya?ml$");
|
528
|
-
private final Pattern EXT_YAML_LIQUID = Pattern.compile(".*\\.ya?ml\\.liquid$");
|
529
|
-
|
530
|
-
private final EmbulkEmbed embed;
|
531
|
-
}
|