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,17 +0,0 @@
|
|
1
|
-
package org.embulk.config;
|
2
|
-
|
3
|
-
public class UserDataExceptions
|
4
|
-
{
|
5
|
-
private UserDataExceptions() { }
|
6
|
-
|
7
|
-
public static boolean isUserDataException(Throwable exception)
|
8
|
-
{
|
9
|
-
while (exception != null) {
|
10
|
-
if (exception instanceof UserDataException) {
|
11
|
-
return true;
|
12
|
-
}
|
13
|
-
exception = exception.getCause();
|
14
|
-
}
|
15
|
-
return false;
|
16
|
-
}
|
17
|
-
}
|
@@ -1,53 +0,0 @@
|
|
1
|
-
package org.embulk.config;
|
2
|
-
|
3
|
-
import java.util.List;
|
4
|
-
import java.util.regex.Pattern;
|
5
|
-
import org.yaml.snakeyaml.resolver.Resolver;
|
6
|
-
import org.yaml.snakeyaml.nodes.Tag;
|
7
|
-
import org.yaml.snakeyaml.nodes.NodeId;
|
8
|
-
|
9
|
-
public class YamlTagResolver
|
10
|
-
extends Resolver
|
11
|
-
{
|
12
|
-
// Resolver converts a node (scalar, sequence, map, or !!tag with them)
|
13
|
-
// to a tag (INT, FLOAT, STR, SEQ, MAP, ...). For example, converting
|
14
|
-
// "123" (scalar) to 123 (INT), or "true" (scalar) to true (BOOL).
|
15
|
-
// This is called by snakeyaml Composer which converts parser events
|
16
|
-
// into an object.
|
17
|
-
//
|
18
|
-
// jackson-dataformat-yaml doesn't use this because it traverses parser
|
19
|
-
// events without using Composer.
|
20
|
-
|
21
|
-
public static final Pattern FLOAT_EXCEPTING_ZERO_START = Pattern
|
22
|
-
.compile("^([-+]?(\\.[0-9]+|[1-9][0-9_]*(\\.[0-9_]*)?)([eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
|
23
|
-
|
24
|
-
@Override
|
25
|
-
public void addImplicitResolver(Tag tag, Pattern regexp, String first)
|
26
|
-
{
|
27
|
-
// This method is called by constructor through addImplicitResolvers
|
28
|
-
// to setup default implicit resolvers.
|
29
|
-
|
30
|
-
if (tag.equals(Tag.FLOAT)) {
|
31
|
-
super.addImplicitResolver(Tag.FLOAT, FLOAT_EXCEPTING_ZERO_START, "-+0123456789.");
|
32
|
-
}
|
33
|
-
else if (tag.equals(Tag.BOOL)) {
|
34
|
-
// use stricter rule (reject 'On', 'Off', 'Yes', 'No')
|
35
|
-
super.addImplicitResolver(Tag.BOOL, Pattern.compile("^(?:[Tt]rue|[Ff]alse)$"), "TtFf");
|
36
|
-
}
|
37
|
-
else if (tag.equals(Tag.TIMESTAMP)) {
|
38
|
-
// This solves some unexpected behavior that snakeyaml
|
39
|
-
// deserializes "2015-01-01 00:00:00" to java.util.Date
|
40
|
-
// but jackson serializes java.util.Date to an integer.
|
41
|
-
return;
|
42
|
-
}
|
43
|
-
else {
|
44
|
-
super.addImplicitResolver(tag, regexp, first);
|
45
|
-
}
|
46
|
-
}
|
47
|
-
|
48
|
-
@Override
|
49
|
-
public Tag resolve(NodeId kind, String value, boolean implicit)
|
50
|
-
{
|
51
|
-
return super.resolve(kind, value, implicit); // checks implicit resolvers
|
52
|
-
}
|
53
|
-
}
|
@@ -1,88 +0,0 @@
|
|
1
|
-
package org.embulk.exec;
|
2
|
-
|
3
|
-
import org.embulk.config.ConfigDiff;
|
4
|
-
import org.embulk.config.ConfigSource;
|
5
|
-
import org.embulk.config.TaskReport;
|
6
|
-
import org.embulk.config.TaskSource;
|
7
|
-
import org.embulk.spi.Buffer;
|
8
|
-
import org.embulk.spi.Exec;
|
9
|
-
import org.embulk.spi.FileInputPlugin;
|
10
|
-
import org.embulk.spi.TransactionalFileInput;
|
11
|
-
|
12
|
-
import java.util.List;
|
13
|
-
|
14
|
-
public class BufferFileInputPlugin
|
15
|
-
implements FileInputPlugin
|
16
|
-
{
|
17
|
-
private Buffer buffer;
|
18
|
-
|
19
|
-
public BufferFileInputPlugin(Buffer buffer)
|
20
|
-
{
|
21
|
-
this.buffer = buffer;
|
22
|
-
}
|
23
|
-
|
24
|
-
public ConfigDiff transaction(ConfigSource config, FileInputPlugin.Control control)
|
25
|
-
{
|
26
|
-
control.run(Exec.newTaskSource(), 1);
|
27
|
-
return Exec.newConfigDiff();
|
28
|
-
}
|
29
|
-
|
30
|
-
public ConfigDiff resume(TaskSource taskSource,
|
31
|
-
int taskCount,
|
32
|
-
FileInputPlugin.Control control)
|
33
|
-
{
|
34
|
-
throw new UnsupportedOperationException();
|
35
|
-
}
|
36
|
-
|
37
|
-
public void cleanup(TaskSource taskSource,
|
38
|
-
int taskCount,
|
39
|
-
List<TaskReport> successTaskReports)
|
40
|
-
{
|
41
|
-
if (buffer != null) {
|
42
|
-
buffer.release();
|
43
|
-
buffer = null;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
public TransactionalFileInput open(TaskSource taskSource, int taskIndex)
|
48
|
-
{
|
49
|
-
return new BufferTransactionalFileInput(buffer);
|
50
|
-
}
|
51
|
-
|
52
|
-
private static class BufferTransactionalFileInput
|
53
|
-
implements TransactionalFileInput
|
54
|
-
{
|
55
|
-
private Buffer buffer;
|
56
|
-
|
57
|
-
public BufferTransactionalFileInput(Buffer buffer)
|
58
|
-
{
|
59
|
-
this.buffer = buffer;
|
60
|
-
}
|
61
|
-
|
62
|
-
@Override
|
63
|
-
public Buffer poll()
|
64
|
-
{
|
65
|
-
Buffer b = buffer;
|
66
|
-
buffer = null;
|
67
|
-
return b;
|
68
|
-
}
|
69
|
-
|
70
|
-
@Override
|
71
|
-
public boolean nextFile()
|
72
|
-
{
|
73
|
-
return buffer != null;
|
74
|
-
}
|
75
|
-
|
76
|
-
@Override
|
77
|
-
public void close() { }
|
78
|
-
|
79
|
-
@Override
|
80
|
-
public void abort() { }
|
81
|
-
|
82
|
-
@Override
|
83
|
-
public TaskReport commit()
|
84
|
-
{
|
85
|
-
return null;
|
86
|
-
}
|
87
|
-
}
|
88
|
-
}
|
@@ -1,754 +0,0 @@
|
|
1
|
-
package org.embulk.exec;
|
2
|
-
|
3
|
-
import java.util.List;
|
4
|
-
import java.util.concurrent.ExecutionException;
|
5
|
-
import com.google.common.base.Optional;
|
6
|
-
import com.google.common.collect.ImmutableList;
|
7
|
-
import com.google.inject.Inject;
|
8
|
-
import com.google.inject.Injector;
|
9
|
-
import com.google.common.base.Throwables;
|
10
|
-
import org.embulk.config.Task;
|
11
|
-
import org.embulk.config.Config;
|
12
|
-
import org.embulk.config.ConfigDefault;
|
13
|
-
import org.embulk.config.ConfigSource;
|
14
|
-
import org.embulk.config.ConfigException;
|
15
|
-
import org.embulk.config.TaskSource;
|
16
|
-
import org.embulk.config.ConfigDiff;
|
17
|
-
import org.embulk.config.TaskReport;
|
18
|
-
import org.embulk.plugin.PluginType;
|
19
|
-
import org.embulk.spi.FileInputRunner;
|
20
|
-
import org.embulk.spi.FileOutputRunner;
|
21
|
-
import org.embulk.spi.Schema;
|
22
|
-
import org.embulk.spi.Exec;
|
23
|
-
import org.embulk.spi.ExecSession;
|
24
|
-
import org.embulk.spi.ExecAction;
|
25
|
-
import org.embulk.spi.ExecutorPlugin;
|
26
|
-
import org.embulk.spi.ProcessTask;
|
27
|
-
import org.embulk.spi.ProcessState;
|
28
|
-
import org.embulk.spi.TaskState;
|
29
|
-
import org.embulk.spi.InputPlugin;
|
30
|
-
import org.embulk.spi.FilterPlugin;
|
31
|
-
import org.embulk.spi.OutputPlugin;
|
32
|
-
import org.embulk.spi.util.Filters;
|
33
|
-
import org.slf4j.Logger;
|
34
|
-
|
35
|
-
public class BulkLoader
|
36
|
-
{
|
37
|
-
private final Injector injector;
|
38
|
-
|
39
|
-
public interface BulkLoaderTask
|
40
|
-
extends Task
|
41
|
-
{
|
42
|
-
@Config("exec")
|
43
|
-
@ConfigDefault("{}")
|
44
|
-
public ConfigSource getExecConfig();
|
45
|
-
|
46
|
-
@Config("in")
|
47
|
-
public ConfigSource getInputConfig();
|
48
|
-
|
49
|
-
@Config("filters")
|
50
|
-
@ConfigDefault("[]")
|
51
|
-
public List<ConfigSource> getFilterConfigs();
|
52
|
-
|
53
|
-
@Config("out")
|
54
|
-
public ConfigSource getOutputConfig();
|
55
|
-
|
56
|
-
public TaskSource getOutputTask();
|
57
|
-
public void setOutputTask(TaskSource taskSource);
|
58
|
-
}
|
59
|
-
|
60
|
-
@Inject
|
61
|
-
public BulkLoader(Injector injector,
|
62
|
-
@ForSystemConfig ConfigSource systemConfig)
|
63
|
-
{
|
64
|
-
this.injector = injector;
|
65
|
-
}
|
66
|
-
|
67
|
-
protected static class LoaderState
|
68
|
-
implements ProcessState
|
69
|
-
{
|
70
|
-
private final Logger logger;
|
71
|
-
|
72
|
-
private final ProcessPluginSet plugins;
|
73
|
-
|
74
|
-
private volatile TaskSource inputTaskSource;
|
75
|
-
private volatile TaskSource outputTaskSource;
|
76
|
-
private volatile List<TaskSource> filterTaskSources;
|
77
|
-
private volatile List<Schema> schemas;
|
78
|
-
private volatile Schema executorSchema;
|
79
|
-
private volatile TransactionStage transactionStage;
|
80
|
-
|
81
|
-
private volatile ConfigDiff inputConfigDiff;
|
82
|
-
private volatile ConfigDiff outputConfigDiff;
|
83
|
-
|
84
|
-
private volatile List<TaskState> inputTaskStates;
|
85
|
-
private volatile List<TaskState> outputTaskStates;
|
86
|
-
|
87
|
-
public LoaderState(Logger logger, ProcessPluginSet plugins)
|
88
|
-
{
|
89
|
-
this.logger = logger;
|
90
|
-
this.plugins = plugins;
|
91
|
-
}
|
92
|
-
|
93
|
-
public Logger getLogger()
|
94
|
-
{
|
95
|
-
return logger;
|
96
|
-
}
|
97
|
-
|
98
|
-
public void setSchemas(List<Schema> schemas)
|
99
|
-
{
|
100
|
-
this.schemas = schemas;
|
101
|
-
}
|
102
|
-
|
103
|
-
public void setExecutorSchema(Schema executorSchema)
|
104
|
-
{
|
105
|
-
this.executorSchema = executorSchema;
|
106
|
-
}
|
107
|
-
|
108
|
-
public void setTransactionStage(TransactionStage transactionStage)
|
109
|
-
{
|
110
|
-
this.transactionStage = transactionStage;
|
111
|
-
}
|
112
|
-
|
113
|
-
public void setInputTaskSource(TaskSource inputTaskSource)
|
114
|
-
{
|
115
|
-
this.inputTaskSource = inputTaskSource;
|
116
|
-
}
|
117
|
-
|
118
|
-
public void setOutputTaskSource(TaskSource outputTaskSource)
|
119
|
-
{
|
120
|
-
this.outputTaskSource = outputTaskSource;
|
121
|
-
}
|
122
|
-
|
123
|
-
public void setFilterTaskSources(List<TaskSource> filterTaskSources)
|
124
|
-
{
|
125
|
-
this.filterTaskSources = filterTaskSources;
|
126
|
-
}
|
127
|
-
|
128
|
-
public ProcessTask buildProcessTask()
|
129
|
-
{
|
130
|
-
return new ProcessTask(
|
131
|
-
plugins.getInputPluginType(), plugins.getOutputPluginType(), plugins.getFilterPluginTypes(),
|
132
|
-
inputTaskSource, outputTaskSource, filterTaskSources,
|
133
|
-
schemas, executorSchema, Exec.newTaskSource());
|
134
|
-
}
|
135
|
-
|
136
|
-
@Override
|
137
|
-
public void initialize(int inputTaskCount, int outputTaskCount)
|
138
|
-
{
|
139
|
-
if (inputTaskStates != null || outputTaskStates != null) {
|
140
|
-
// initialize is called twice if resume (by restoreResumedTaskReports and ExecutorPlugin.execute)
|
141
|
-
if (inputTaskStates.size() != inputTaskCount || outputTaskStates.size() != outputTaskCount) {
|
142
|
-
throw new ConfigException(String.format(
|
143
|
-
"input task count and output task (%d and %d) must be same with the first execution (%d and %d) whenre resumed",
|
144
|
-
inputTaskCount, outputTaskCount, inputTaskStates.size(), outputTaskStates.size()));
|
145
|
-
}
|
146
|
-
} else {
|
147
|
-
ImmutableList.Builder<TaskState> inputTaskStates = ImmutableList.builder();
|
148
|
-
ImmutableList.Builder<TaskState> outputTaskStates = ImmutableList.builder();
|
149
|
-
for (int i=0; i < inputTaskCount; i++) {
|
150
|
-
inputTaskStates.add(new TaskState());
|
151
|
-
}
|
152
|
-
for (int i=0; i < outputTaskCount; i++) {
|
153
|
-
outputTaskStates.add(new TaskState());
|
154
|
-
}
|
155
|
-
this.inputTaskStates = inputTaskStates.build();
|
156
|
-
this.outputTaskStates = outputTaskStates.build();
|
157
|
-
}
|
158
|
-
}
|
159
|
-
|
160
|
-
@Override
|
161
|
-
public TaskState getInputTaskState(int inputTaskIndex)
|
162
|
-
{
|
163
|
-
return inputTaskStates.get(inputTaskIndex);
|
164
|
-
}
|
165
|
-
|
166
|
-
@Override
|
167
|
-
public TaskState getOutputTaskState(int outputTaskIndex)
|
168
|
-
{
|
169
|
-
return outputTaskStates.get(outputTaskIndex);
|
170
|
-
}
|
171
|
-
|
172
|
-
public boolean isAllTasksCommitted()
|
173
|
-
{
|
174
|
-
// here can't assume that input tasks are committed when output tasks are
|
175
|
-
// committed because that's controlled by executor plugins. some executor
|
176
|
-
// plugins (especially mapreduce executor) may commit output tasks even
|
177
|
-
// when some input tasks failed. This is asemantically allowed behavior for
|
178
|
-
// executor plugins (as long as output plugin is atomic and idempotent).
|
179
|
-
if (inputTaskStates == null || outputTaskStates == null) {
|
180
|
-
// not initialized
|
181
|
-
return false;
|
182
|
-
}
|
183
|
-
for (TaskState inputTaskState : inputTaskStates) {
|
184
|
-
if (!inputTaskState.isCommitted()) {
|
185
|
-
return false;
|
186
|
-
}
|
187
|
-
}
|
188
|
-
for (TaskState outputTaskState : outputTaskStates) {
|
189
|
-
if (!outputTaskState.isCommitted()) {
|
190
|
-
return false;
|
191
|
-
}
|
192
|
-
}
|
193
|
-
return true;
|
194
|
-
}
|
195
|
-
|
196
|
-
public int countUncommittedInputTasks()
|
197
|
-
{
|
198
|
-
if (inputTaskStates == null) {
|
199
|
-
// not initialized
|
200
|
-
return 0;
|
201
|
-
}
|
202
|
-
int count = 0;
|
203
|
-
for (TaskState inputTaskState : inputTaskStates) {
|
204
|
-
if (!inputTaskState.isCommitted()) {
|
205
|
-
count++;
|
206
|
-
}
|
207
|
-
}
|
208
|
-
return count;
|
209
|
-
}
|
210
|
-
|
211
|
-
public int countUncommittedOutputTasks()
|
212
|
-
{
|
213
|
-
if (outputTaskStates == null) {
|
214
|
-
// not initialized
|
215
|
-
return 0;
|
216
|
-
}
|
217
|
-
int count = 0;
|
218
|
-
for (TaskState outputTaskState : outputTaskStates) {
|
219
|
-
if (!outputTaskState.isCommitted()) {
|
220
|
-
count++;
|
221
|
-
}
|
222
|
-
}
|
223
|
-
return count;
|
224
|
-
}
|
225
|
-
|
226
|
-
public boolean isAllTransactionsCommitted()
|
227
|
-
{
|
228
|
-
return inputConfigDiff != null && outputConfigDiff != null;
|
229
|
-
}
|
230
|
-
|
231
|
-
public void setOutputConfigDiff(ConfigDiff outputConfigDiff)
|
232
|
-
{
|
233
|
-
if (outputConfigDiff == null) {
|
234
|
-
outputConfigDiff = Exec.newConfigDiff();
|
235
|
-
}
|
236
|
-
this.outputConfigDiff = outputConfigDiff;
|
237
|
-
}
|
238
|
-
|
239
|
-
public void setInputConfigDiff(ConfigDiff inputConfigDiff)
|
240
|
-
{
|
241
|
-
if (inputConfigDiff == null) {
|
242
|
-
inputConfigDiff = Exec.newConfigDiff();
|
243
|
-
}
|
244
|
-
this.inputConfigDiff = inputConfigDiff;
|
245
|
-
}
|
246
|
-
|
247
|
-
private List<Optional<TaskReport>> getInputTaskReports()
|
248
|
-
{
|
249
|
-
ImmutableList.Builder<Optional<TaskReport>> builder = ImmutableList.builder();
|
250
|
-
for (TaskState inputTaskState : inputTaskStates) {
|
251
|
-
builder.add(inputTaskState.getTaskReport());
|
252
|
-
}
|
253
|
-
return builder.build();
|
254
|
-
}
|
255
|
-
|
256
|
-
private List<Optional<TaskReport>> getOutputTaskReports()
|
257
|
-
{
|
258
|
-
ImmutableList.Builder<Optional<TaskReport>> builder = ImmutableList.builder();
|
259
|
-
for (TaskState outputTaskState : outputTaskStates) {
|
260
|
-
builder.add(outputTaskState.getTaskReport());
|
261
|
-
}
|
262
|
-
return builder.build();
|
263
|
-
}
|
264
|
-
|
265
|
-
public List<TaskReport> getAllInputTaskReports()
|
266
|
-
{
|
267
|
-
ImmutableList.Builder<TaskReport> builder = ImmutableList.builder();
|
268
|
-
for (TaskState inputTaskState : inputTaskStates) {
|
269
|
-
builder.add(inputTaskState.getTaskReport().get());
|
270
|
-
}
|
271
|
-
return builder.build();
|
272
|
-
}
|
273
|
-
|
274
|
-
public List<TaskReport> getAllOutputTaskReports()
|
275
|
-
{
|
276
|
-
ImmutableList.Builder<TaskReport> builder = ImmutableList.builder();
|
277
|
-
for (TaskState outputTaskState : outputTaskStates) {
|
278
|
-
builder.add(outputTaskState.getTaskReport().get());
|
279
|
-
}
|
280
|
-
return builder.build();
|
281
|
-
}
|
282
|
-
|
283
|
-
public List<Throwable> getExceptions()
|
284
|
-
{
|
285
|
-
ImmutableList.Builder<Throwable> builder = ImmutableList.builder();
|
286
|
-
if (inputTaskStates != null) { // null if not initialized yet
|
287
|
-
for (TaskState inputTaskState : inputTaskStates) {
|
288
|
-
Optional<Throwable> exception = inputTaskState.getException();
|
289
|
-
if (exception.isPresent()) {
|
290
|
-
builder.add(exception.get());
|
291
|
-
}
|
292
|
-
}
|
293
|
-
}
|
294
|
-
if (outputTaskStates != null) { // null if not initialized yet
|
295
|
-
for (TaskState outputTaskState : outputTaskStates) {
|
296
|
-
Optional<Throwable> exception = outputTaskState.getException();
|
297
|
-
if (exception.isPresent()) {
|
298
|
-
builder.add(exception.get());
|
299
|
-
}
|
300
|
-
}
|
301
|
-
}
|
302
|
-
return builder.build();
|
303
|
-
}
|
304
|
-
|
305
|
-
public RuntimeException getRepresentativeException()
|
306
|
-
{
|
307
|
-
RuntimeException top = null;
|
308
|
-
for (Throwable ex : getExceptions()) {
|
309
|
-
if (top != null) {
|
310
|
-
top.addSuppressed(ex);
|
311
|
-
} else {
|
312
|
-
if (ex instanceof RuntimeException) {
|
313
|
-
top = (RuntimeException) ex;
|
314
|
-
} else {
|
315
|
-
top = new RuntimeException(ex);
|
316
|
-
}
|
317
|
-
}
|
318
|
-
}
|
319
|
-
if (top == null) {
|
320
|
-
top = new RuntimeException("Some transactions are not committed");
|
321
|
-
}
|
322
|
-
return top;
|
323
|
-
}
|
324
|
-
|
325
|
-
public ExecutionResult buildExecuteResult()
|
326
|
-
{
|
327
|
-
return buildExecuteResultWithWarningException(null);
|
328
|
-
}
|
329
|
-
|
330
|
-
public ExecutionResult buildExecuteResultWithWarningException(Throwable ex)
|
331
|
-
{
|
332
|
-
ConfigDiff configDiff = Exec.newConfigDiff();
|
333
|
-
if (inputConfigDiff != null) {
|
334
|
-
configDiff.getNestedOrSetEmpty("in").merge(inputConfigDiff);
|
335
|
-
}
|
336
|
-
if (outputConfigDiff != null) {
|
337
|
-
configDiff.getNestedOrSetEmpty("out").merge(outputConfigDiff);
|
338
|
-
}
|
339
|
-
|
340
|
-
ImmutableList.Builder<Throwable> ignoredExceptions = ImmutableList.builder();
|
341
|
-
for (Throwable e : getExceptions()) {
|
342
|
-
ignoredExceptions.add(e);
|
343
|
-
}
|
344
|
-
if (ex != null) {
|
345
|
-
ignoredExceptions.add(ex);
|
346
|
-
}
|
347
|
-
|
348
|
-
return new ExecutionResult(configDiff, false, ignoredExceptions.build());
|
349
|
-
}
|
350
|
-
|
351
|
-
public ExecutionResult buildExecuteResultOfSkippedExecution(ConfigDiff configDiff)
|
352
|
-
{
|
353
|
-
ImmutableList.Builder<Throwable> ignoredExceptions = ImmutableList.builder();
|
354
|
-
for (Throwable e : getExceptions()) {
|
355
|
-
ignoredExceptions.add(e);
|
356
|
-
}
|
357
|
-
|
358
|
-
return new ExecutionResult(configDiff, true, ignoredExceptions.build());
|
359
|
-
}
|
360
|
-
|
361
|
-
public ResumeState buildResumeState(ExecSession exec)
|
362
|
-
{
|
363
|
-
Schema inputSchema = (schemas == null) ? null : schemas.get(0);
|
364
|
-
List<Optional<TaskReport>> inputTaskReports = (inputTaskStates == null) ? null : getInputTaskReports();
|
365
|
-
List<Optional<TaskReport>> outputTaskReports = (outputTaskStates == null) ? null : getOutputTaskReports();
|
366
|
-
return new ResumeState(
|
367
|
-
exec.getSessionExecConfig(),
|
368
|
-
inputTaskSource, outputTaskSource,
|
369
|
-
inputSchema, executorSchema,
|
370
|
-
inputTaskReports, outputTaskReports);
|
371
|
-
}
|
372
|
-
|
373
|
-
public PartialExecutionException buildPartialExecuteException(Throwable cause, ExecSession exec)
|
374
|
-
{
|
375
|
-
return new PartialExecutionException(cause, buildResumeState(exec), transactionStage);
|
376
|
-
}
|
377
|
-
}
|
378
|
-
|
379
|
-
protected LoaderState newLoaderState(Logger logger, ProcessPluginSet plugins)
|
380
|
-
{
|
381
|
-
return new LoaderState(logger, plugins);
|
382
|
-
}
|
383
|
-
|
384
|
-
public ExecutionResult run(ExecSession exec, final ConfigSource config)
|
385
|
-
{
|
386
|
-
try {
|
387
|
-
return Exec.doWith(exec, new ExecAction<ExecutionResult>() {
|
388
|
-
public ExecutionResult run()
|
389
|
-
{
|
390
|
-
try (SetCurrentThreadName dontCare = new SetCurrentThreadName("transaction")) {
|
391
|
-
return doRun(config);
|
392
|
-
}
|
393
|
-
}
|
394
|
-
});
|
395
|
-
} catch (ExecutionException ex) {
|
396
|
-
throw Throwables.propagate(ex.getCause());
|
397
|
-
}
|
398
|
-
}
|
399
|
-
|
400
|
-
public ExecutionResult resume(final ConfigSource config, final ResumeState resume)
|
401
|
-
{
|
402
|
-
try {
|
403
|
-
ExecSession exec = ExecSession.builder(injector).fromExecConfig(resume.getExecSessionConfigSource()).build();
|
404
|
-
ExecutionResult result = Exec.doWith(exec, new ExecAction<ExecutionResult>() {
|
405
|
-
public ExecutionResult run()
|
406
|
-
{
|
407
|
-
try (SetCurrentThreadName dontCare = new SetCurrentThreadName("resume")) {
|
408
|
-
return doResume(config, resume);
|
409
|
-
}
|
410
|
-
}
|
411
|
-
});
|
412
|
-
exec.cleanup();
|
413
|
-
return result;
|
414
|
-
} catch (ExecutionException ex) {
|
415
|
-
throw Throwables.propagate(ex.getCause());
|
416
|
-
}
|
417
|
-
}
|
418
|
-
|
419
|
-
public void cleanup(final ConfigSource config, final ResumeState resume)
|
420
|
-
{
|
421
|
-
try {
|
422
|
-
ExecSession exec = ExecSession.builder(injector).fromExecConfig(resume.getExecSessionConfigSource()).build();
|
423
|
-
Exec.doWith(exec, new ExecAction<Void>() {
|
424
|
-
public Void run()
|
425
|
-
{
|
426
|
-
try (SetCurrentThreadName dontCare = new SetCurrentThreadName("cleanup")) {
|
427
|
-
doCleanup(config, resume);
|
428
|
-
return null;
|
429
|
-
}
|
430
|
-
}
|
431
|
-
});
|
432
|
-
exec.cleanup();
|
433
|
-
} catch (ExecutionException ex) {
|
434
|
-
throw Throwables.propagate(ex.getCause());
|
435
|
-
}
|
436
|
-
}
|
437
|
-
|
438
|
-
protected static class ProcessPluginSet
|
439
|
-
{
|
440
|
-
private final PluginType inputPluginType;
|
441
|
-
private final PluginType outputPluginType;
|
442
|
-
private final List<PluginType> filterPluginTypes;
|
443
|
-
|
444
|
-
private final InputPlugin inputPlugin;
|
445
|
-
private final OutputPlugin outputPlugin;
|
446
|
-
private final List<FilterPlugin> filterPlugins;
|
447
|
-
|
448
|
-
public ProcessPluginSet(BulkLoaderTask task)
|
449
|
-
{
|
450
|
-
this.inputPluginType = task.getInputConfig().get(PluginType.class, "type");
|
451
|
-
this.outputPluginType = task.getOutputConfig().get(PluginType.class, "type");
|
452
|
-
this.filterPluginTypes = Filters.getPluginTypes(task.getFilterConfigs());
|
453
|
-
this.inputPlugin = Exec.newPlugin(InputPlugin.class, inputPluginType);
|
454
|
-
this.outputPlugin = Exec.newPlugin(OutputPlugin.class, outputPluginType);
|
455
|
-
this.filterPlugins = Filters.newFilterPlugins(Exec.session(), filterPluginTypes);
|
456
|
-
}
|
457
|
-
|
458
|
-
public PluginType getInputPluginType()
|
459
|
-
{
|
460
|
-
return inputPluginType;
|
461
|
-
}
|
462
|
-
|
463
|
-
public PluginType getOutputPluginType()
|
464
|
-
{
|
465
|
-
return outputPluginType;
|
466
|
-
}
|
467
|
-
|
468
|
-
public List<PluginType> getFilterPluginTypes()
|
469
|
-
{
|
470
|
-
return filterPluginTypes;
|
471
|
-
}
|
472
|
-
|
473
|
-
public InputPlugin getInputPlugin()
|
474
|
-
{
|
475
|
-
return inputPlugin;
|
476
|
-
}
|
477
|
-
|
478
|
-
public OutputPlugin getOutputPlugin()
|
479
|
-
{
|
480
|
-
return outputPlugin;
|
481
|
-
}
|
482
|
-
|
483
|
-
public List<FilterPlugin> getFilterPlugins()
|
484
|
-
{
|
485
|
-
return filterPlugins;
|
486
|
-
}
|
487
|
-
}
|
488
|
-
|
489
|
-
public void doCleanup(ConfigSource config, ResumeState resume)
|
490
|
-
{
|
491
|
-
BulkLoaderTask task = config.loadConfig(BulkLoaderTask.class);
|
492
|
-
ProcessPluginSet plugins = new ProcessPluginSet(task); // TODO don't create filter plugins
|
493
|
-
|
494
|
-
ImmutableList.Builder<TaskReport> successfulInputTaskReports = ImmutableList.builder();
|
495
|
-
ImmutableList.Builder<TaskReport> successfulOutputTaskReports = ImmutableList.builder();
|
496
|
-
for (Optional<TaskReport> inputTaskReport : resume.getInputTaskReports()) {
|
497
|
-
if (inputTaskReport.isPresent()) {
|
498
|
-
successfulInputTaskReports.add(inputTaskReport.get());
|
499
|
-
}
|
500
|
-
}
|
501
|
-
for (Optional<TaskReport> outputTaskReport : resume.getOutputTaskReports()) {
|
502
|
-
if (outputTaskReport.isPresent()) {
|
503
|
-
successfulOutputTaskReports.add(outputTaskReport.get());
|
504
|
-
}
|
505
|
-
}
|
506
|
-
|
507
|
-
final TaskSource inputTaskSource;
|
508
|
-
if (plugins.getInputPlugin() instanceof FileInputRunner) {
|
509
|
-
inputTaskSource = FileInputRunner.getFileInputTaskSource(resume.getInputTaskSource());
|
510
|
-
}
|
511
|
-
else {
|
512
|
-
inputTaskSource = resume.getInputTaskSource();
|
513
|
-
}
|
514
|
-
plugins.getInputPlugin().cleanup(inputTaskSource, resume.getInputSchema(),
|
515
|
-
resume.getInputTaskReports().size(), successfulInputTaskReports.build());
|
516
|
-
|
517
|
-
final TaskSource outputTaskSource;
|
518
|
-
if (plugins.getOutputPlugin() instanceof FileOutputRunner) {
|
519
|
-
outputTaskSource = FileOutputRunner.getFileOutputTaskSource(resume.getOutputTaskSource());
|
520
|
-
}
|
521
|
-
else {
|
522
|
-
outputTaskSource = resume.getOutputTaskSource();
|
523
|
-
}
|
524
|
-
plugins.getOutputPlugin().cleanup(outputTaskSource, resume.getOutputSchema(),
|
525
|
-
resume.getOutputTaskReports().size(), successfulOutputTaskReports.build());
|
526
|
-
}
|
527
|
-
|
528
|
-
private ExecutorPlugin newExecutorPlugin(BulkLoaderTask task)
|
529
|
-
{
|
530
|
-
return Exec.newPlugin(ExecutorPlugin.class,
|
531
|
-
task.getExecConfig().get(PluginType.class, "type", PluginType.LOCAL));
|
532
|
-
}
|
533
|
-
|
534
|
-
private ExecutionResult doRun(ConfigSource config)
|
535
|
-
{
|
536
|
-
final BulkLoaderTask task = config.loadConfig(BulkLoaderTask.class);
|
537
|
-
|
538
|
-
final ExecutorPlugin exec = newExecutorPlugin(task);
|
539
|
-
final ProcessPluginSet plugins = new ProcessPluginSet(task);
|
540
|
-
|
541
|
-
final LoaderState state = newLoaderState(Exec.getLogger(BulkLoader.class), plugins);
|
542
|
-
state.setTransactionStage(TransactionStage.INPUT_BEGIN);
|
543
|
-
try {
|
544
|
-
ConfigDiff inputConfigDiff = plugins.getInputPlugin().transaction(task.getInputConfig(), new InputPlugin.Control() {
|
545
|
-
public List<TaskReport> run(final TaskSource inputTask, final Schema inputSchema, final int inputTaskCount)
|
546
|
-
{
|
547
|
-
state.setInputTaskSource(inputTask);
|
548
|
-
state.setTransactionStage(TransactionStage.FILTER_BEGIN);
|
549
|
-
Filters.transaction(plugins.getFilterPlugins(), task.getFilterConfigs(), inputSchema, new Filters.Control() {
|
550
|
-
public void run(final List<TaskSource> filterTasks, final List<Schema> schemas)
|
551
|
-
{
|
552
|
-
state.setSchemas(schemas);
|
553
|
-
state.setFilterTaskSources(filterTasks);
|
554
|
-
state.setTransactionStage(TransactionStage.EXECUTOR_BEGIN);
|
555
|
-
exec.transaction(task.getExecConfig(), last(schemas), inputTaskCount, new ExecutorPlugin.Control() {
|
556
|
-
public void transaction(final Schema executorSchema, final int outputTaskCount, final ExecutorPlugin.Executor executor)
|
557
|
-
{
|
558
|
-
state.setExecutorSchema(executorSchema);
|
559
|
-
state.setTransactionStage(TransactionStage.OUTPUT_BEGIN);
|
560
|
-
ConfigDiff outputConfigDiff = plugins.getOutputPlugin().transaction(task.getOutputConfig(), executorSchema, outputTaskCount, new OutputPlugin.Control() {
|
561
|
-
public List<TaskReport> run(final TaskSource outputTask)
|
562
|
-
{
|
563
|
-
state.setOutputTaskSource(outputTask);
|
564
|
-
state.initialize(inputTaskCount, outputTaskCount);
|
565
|
-
state.setTransactionStage(TransactionStage.RUN);
|
566
|
-
|
567
|
-
if (!state.isAllTasksCommitted()) { // inputTaskCount == 0
|
568
|
-
execute(task, executor, state);
|
569
|
-
}
|
570
|
-
|
571
|
-
if (!state.isAllTasksCommitted()) {
|
572
|
-
throw new RuntimeException(String.format("%d input tasks and %d output tasks failed",
|
573
|
-
state.countUncommittedInputTasks(), state.countUncommittedOutputTasks()));
|
574
|
-
}
|
575
|
-
|
576
|
-
state.setTransactionStage(TransactionStage.OUTPUT_COMMIT);
|
577
|
-
return state.getAllOutputTaskReports();
|
578
|
-
}
|
579
|
-
});
|
580
|
-
state.setOutputConfigDiff(outputConfigDiff);
|
581
|
-
state.setTransactionStage(TransactionStage.EXECUTOR_COMMIT);
|
582
|
-
}
|
583
|
-
});
|
584
|
-
state.setTransactionStage(TransactionStage.FILTER_COMMIT);
|
585
|
-
}
|
586
|
-
});
|
587
|
-
state.setTransactionStage(TransactionStage.INPUT_COMMIT);
|
588
|
-
return state.getAllInputTaskReports();
|
589
|
-
}
|
590
|
-
});
|
591
|
-
state.setInputConfigDiff(inputConfigDiff);
|
592
|
-
state.setTransactionStage(TransactionStage.CLEANUP);
|
593
|
-
|
594
|
-
cleanupCommittedTransaction(config, state);
|
595
|
-
|
596
|
-
return state.buildExecuteResult();
|
597
|
-
|
598
|
-
} catch (Throwable ex) {
|
599
|
-
if (isSkippedTransaction(ex)) {
|
600
|
-
ConfigDiff configDiff = ((SkipTransactionException) ex).getConfigDiff();
|
601
|
-
return state.buildExecuteResultOfSkippedExecution(configDiff);
|
602
|
-
}
|
603
|
-
else if (state.isAllTasksCommitted() && state.isAllTransactionsCommitted()) {
|
604
|
-
// ignore the exception
|
605
|
-
return state.buildExecuteResultWithWarningException(ex);
|
606
|
-
}
|
607
|
-
throw state.buildPartialExecuteException(ex, Exec.session());
|
608
|
-
}
|
609
|
-
}
|
610
|
-
|
611
|
-
private ExecutionResult doResume(ConfigSource config, final ResumeState resume)
|
612
|
-
{
|
613
|
-
final BulkLoaderTask task = config.loadConfig(BulkLoaderTask.class);
|
614
|
-
|
615
|
-
final ExecutorPlugin exec = newExecutorPlugin(task);
|
616
|
-
final ProcessPluginSet plugins = new ProcessPluginSet(task);
|
617
|
-
|
618
|
-
final LoaderState state = newLoaderState(Exec.getLogger(BulkLoader.class), plugins);
|
619
|
-
state.setTransactionStage(TransactionStage.INPUT_BEGIN);
|
620
|
-
try {
|
621
|
-
ConfigDiff inputConfigDiff = plugins.getInputPlugin().resume(resume.getInputTaskSource(), resume.getInputSchema(), resume.getInputTaskReports().size(), new InputPlugin.Control() {
|
622
|
-
public List<TaskReport> run(final TaskSource inputTask, final Schema inputSchema, final int inputTaskCount)
|
623
|
-
{
|
624
|
-
// TODO validate inputTask?
|
625
|
-
// TODO validate inputSchema
|
626
|
-
state.setInputTaskSource(inputTask);
|
627
|
-
state.setTransactionStage(TransactionStage.FILTER_BEGIN);
|
628
|
-
Filters.transaction(plugins.getFilterPlugins(), task.getFilterConfigs(), inputSchema, new Filters.Control() {
|
629
|
-
public void run(final List<TaskSource> filterTasks, final List<Schema> schemas)
|
630
|
-
{
|
631
|
-
state.setSchemas(schemas);
|
632
|
-
state.setFilterTaskSources(filterTasks);
|
633
|
-
state.setTransactionStage(TransactionStage.EXECUTOR_BEGIN);
|
634
|
-
exec.transaction(task.getExecConfig(), last(schemas), inputTaskCount, new ExecutorPlugin.Control() {
|
635
|
-
public void transaction(final Schema executorSchema, final int outputTaskCount, final ExecutorPlugin.Executor executor)
|
636
|
-
{
|
637
|
-
// TODO validate executorSchema
|
638
|
-
state.setExecutorSchema(executorSchema);
|
639
|
-
state.setTransactionStage(TransactionStage.OUTPUT_BEGIN);
|
640
|
-
ConfigDiff outputConfigDiff = plugins.getOutputPlugin().resume(resume.getOutputTaskSource(), executorSchema, outputTaskCount, new OutputPlugin.Control() {
|
641
|
-
public List<TaskReport> run(final TaskSource outputTask)
|
642
|
-
{
|
643
|
-
// TODO validate outputTask?
|
644
|
-
state.setOutputTaskSource(outputTask);
|
645
|
-
restoreResumedTaskReports(resume, state);
|
646
|
-
state.setTransactionStage(TransactionStage.RUN);
|
647
|
-
|
648
|
-
if (!state.isAllTasksCommitted()) {
|
649
|
-
execute(task, executor, state);
|
650
|
-
}
|
651
|
-
|
652
|
-
if (!state.isAllTasksCommitted()) {
|
653
|
-
throw new RuntimeException(String.format("%d input tasks and %d output tasks failed",
|
654
|
-
state.countUncommittedInputTasks(), state.countUncommittedOutputTasks()));
|
655
|
-
}
|
656
|
-
|
657
|
-
state.setTransactionStage(TransactionStage.OUTPUT_COMMIT);
|
658
|
-
return state.getAllOutputTaskReports();
|
659
|
-
}
|
660
|
-
});
|
661
|
-
state.setOutputConfigDiff(outputConfigDiff);
|
662
|
-
state.setTransactionStage(TransactionStage.EXECUTOR_COMMIT);
|
663
|
-
}
|
664
|
-
});
|
665
|
-
state.setTransactionStage(TransactionStage.FILTER_COMMIT);
|
666
|
-
}
|
667
|
-
});
|
668
|
-
state.setTransactionStage(TransactionStage.INPUT_COMMIT);
|
669
|
-
return state.getAllInputTaskReports();
|
670
|
-
}
|
671
|
-
});
|
672
|
-
state.setInputConfigDiff(inputConfigDiff);
|
673
|
-
state.setTransactionStage(TransactionStage.CLEANUP);
|
674
|
-
|
675
|
-
cleanupCommittedTransaction(config, state);
|
676
|
-
|
677
|
-
return state.buildExecuteResult();
|
678
|
-
|
679
|
-
} catch (Throwable ex) {
|
680
|
-
if (isSkippedTransaction(ex)) {
|
681
|
-
ConfigDiff configDiff = ((SkipTransactionException) ex).getConfigDiff();
|
682
|
-
return state.buildExecuteResultOfSkippedExecution(configDiff);
|
683
|
-
}
|
684
|
-
else if (state.isAllTasksCommitted() && state.isAllTransactionsCommitted()) {
|
685
|
-
// ignore the exception
|
686
|
-
return state.buildExecuteResultWithWarningException(ex);
|
687
|
-
}
|
688
|
-
throw state.buildPartialExecuteException(ex, Exec.session());
|
689
|
-
}
|
690
|
-
}
|
691
|
-
|
692
|
-
private static boolean isSkippedTransaction(Throwable ex)
|
693
|
-
{
|
694
|
-
return ex instanceof SkipTransactionException;
|
695
|
-
}
|
696
|
-
|
697
|
-
private static void restoreResumedTaskReports(ResumeState resume, LoaderState state)
|
698
|
-
{
|
699
|
-
int inputTaskCount = resume.getInputTaskReports().size();
|
700
|
-
int outputTaskCount = resume.getOutputTaskReports().size();
|
701
|
-
|
702
|
-
state.initialize(inputTaskCount, outputTaskCount);
|
703
|
-
|
704
|
-
for (int i=0; i < inputTaskCount; i++) {
|
705
|
-
Optional<TaskReport> report = resume.getInputTaskReports().get(i);
|
706
|
-
if (report.isPresent()) {
|
707
|
-
TaskState task = state.getInputTaskState(i);
|
708
|
-
task.start();
|
709
|
-
task.setTaskReport(report.get());
|
710
|
-
task.finish();
|
711
|
-
}
|
712
|
-
}
|
713
|
-
|
714
|
-
for (int i=0; i < outputTaskCount; i++) {
|
715
|
-
Optional<TaskReport> report = resume.getOutputTaskReports().get(i);
|
716
|
-
if (report.isPresent()) {
|
717
|
-
TaskState task = state.getOutputTaskState(i);
|
718
|
-
task.start();
|
719
|
-
task.setTaskReport(report.get());
|
720
|
-
task.finish();
|
721
|
-
}
|
722
|
-
}
|
723
|
-
}
|
724
|
-
|
725
|
-
private void execute(BulkLoaderTask task, ExecutorPlugin.Executor executor, LoaderState state)
|
726
|
-
{
|
727
|
-
ProcessTask procTask = state.buildProcessTask();
|
728
|
-
|
729
|
-
executor.execute(procTask, state);
|
730
|
-
|
731
|
-
if (!state.isAllTasksCommitted()) {
|
732
|
-
throw state.getRepresentativeException();
|
733
|
-
}
|
734
|
-
}
|
735
|
-
|
736
|
-
private void cleanupCommittedTransaction(ConfigSource config, LoaderState state)
|
737
|
-
{
|
738
|
-
try {
|
739
|
-
doCleanup(config, state.buildResumeState(Exec.session()));
|
740
|
-
} catch (Exception ex) {
|
741
|
-
state.getLogger().warn("Commit succeeded but cleanup failed. Ignoring this exception.", ex); // TODO
|
742
|
-
}
|
743
|
-
}
|
744
|
-
|
745
|
-
private static Schema first(List<Schema> schemas)
|
746
|
-
{
|
747
|
-
return schemas.get(0);
|
748
|
-
}
|
749
|
-
|
750
|
-
private static Schema last(List<Schema> schemas)
|
751
|
-
{
|
752
|
-
return schemas.get(schemas.size() - 1);
|
753
|
-
}
|
754
|
-
}
|