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,28 +0,0 @@
|
|
1
|
-
package org.embulk.spi;
|
2
|
-
|
3
|
-
import java.util.List;
|
4
|
-
import org.embulk.config.TaskSource;
|
5
|
-
import org.embulk.config.ConfigSource;
|
6
|
-
import org.embulk.config.ConfigDiff;
|
7
|
-
import org.embulk.config.TaskReport;
|
8
|
-
|
9
|
-
public interface FileOutputPlugin
|
10
|
-
{
|
11
|
-
interface Control
|
12
|
-
{
|
13
|
-
List<TaskReport> run(TaskSource taskSource);
|
14
|
-
}
|
15
|
-
|
16
|
-
ConfigDiff transaction(ConfigSource config, int taskCount,
|
17
|
-
FileOutputPlugin.Control control);
|
18
|
-
|
19
|
-
ConfigDiff resume(TaskSource taskSource,
|
20
|
-
int taskCount,
|
21
|
-
FileOutputPlugin.Control control);
|
22
|
-
|
23
|
-
void cleanup(TaskSource taskSource,
|
24
|
-
int taskCount,
|
25
|
-
List<TaskReport> successTaskReports);
|
26
|
-
|
27
|
-
TransactionalFileOutput open(TaskSource taskSource, int taskIndex);
|
28
|
-
}
|
@@ -1,199 +0,0 @@
|
|
1
|
-
package org.embulk.spi;
|
2
|
-
|
3
|
-
import java.util.List;
|
4
|
-
import java.util.ArrayList;
|
5
|
-
import org.embulk.config.Task;
|
6
|
-
import org.embulk.config.TaskSource;
|
7
|
-
import org.embulk.config.ConfigSource;
|
8
|
-
import org.embulk.config.ConfigDiff;
|
9
|
-
import org.embulk.config.TaskReport;
|
10
|
-
import org.embulk.config.Config;
|
11
|
-
import org.embulk.config.ConfigDefault;
|
12
|
-
import org.embulk.plugin.PluginType;
|
13
|
-
import org.embulk.plugin.compat.PluginWrappers;
|
14
|
-
import org.embulk.spi.util.Encoders;
|
15
|
-
|
16
|
-
public class FileOutputRunner
|
17
|
-
implements OutputPlugin
|
18
|
-
{
|
19
|
-
private final FileOutputPlugin fileOutputPlugin;
|
20
|
-
|
21
|
-
public FileOutputRunner(FileOutputPlugin fileOutputPlugin)
|
22
|
-
{
|
23
|
-
this.fileOutputPlugin = fileOutputPlugin;
|
24
|
-
}
|
25
|
-
|
26
|
-
private interface RunnerTask extends Task
|
27
|
-
{
|
28
|
-
@Config("type")
|
29
|
-
public PluginType getType();
|
30
|
-
|
31
|
-
@Config("encoders")
|
32
|
-
@ConfigDefault("[]")
|
33
|
-
public List<ConfigSource> getEncoderConfigs();
|
34
|
-
|
35
|
-
@Config("formatter")
|
36
|
-
public ConfigSource getFormatterConfig();
|
37
|
-
|
38
|
-
public void setFileOutputTaskSource(TaskSource v);
|
39
|
-
public TaskSource getFileOutputTaskSource();
|
40
|
-
|
41
|
-
public void setEncoderTaskSources(List<TaskSource> v);
|
42
|
-
public List<TaskSource> getEncoderTaskSources();
|
43
|
-
|
44
|
-
public void setFormatterTaskSource(TaskSource v);
|
45
|
-
public TaskSource getFormatterTaskSource();
|
46
|
-
}
|
47
|
-
|
48
|
-
protected List<EncoderPlugin> newEncoderPlugins(RunnerTask task)
|
49
|
-
{
|
50
|
-
return Encoders.newEncoderPlugins(Exec.session(), task.getEncoderConfigs());
|
51
|
-
}
|
52
|
-
|
53
|
-
protected FormatterPlugin newFormatterPlugin(RunnerTask task)
|
54
|
-
{
|
55
|
-
return Exec.newPlugin(FormatterPlugin.class, task.getFormatterConfig().get(PluginType.class, "type"));
|
56
|
-
}
|
57
|
-
|
58
|
-
@Override
|
59
|
-
public ConfigDiff transaction(ConfigSource config,
|
60
|
-
final Schema schema, final int taskCount,
|
61
|
-
final OutputPlugin.Control control)
|
62
|
-
{
|
63
|
-
final RunnerTask task = config.loadConfig(RunnerTask.class);
|
64
|
-
return fileOutputPlugin.transaction(config, taskCount, new RunnerControl(schema, task, control));
|
65
|
-
}
|
66
|
-
|
67
|
-
public ConfigDiff resume(TaskSource taskSource,
|
68
|
-
Schema schema, int taskCount,
|
69
|
-
final OutputPlugin.Control control)
|
70
|
-
{
|
71
|
-
final RunnerTask task = taskSource.loadTask(RunnerTask.class);
|
72
|
-
return fileOutputPlugin.resume(task.getFileOutputTaskSource(), taskCount, new RunnerControl(schema, task, control));
|
73
|
-
}
|
74
|
-
|
75
|
-
private class RunnerControl
|
76
|
-
implements FileOutputPlugin.Control
|
77
|
-
{
|
78
|
-
private final Schema schema;
|
79
|
-
private final RunnerTask task;
|
80
|
-
private final List<EncoderPlugin> encoderPlugins;
|
81
|
-
private final FormatterPlugin formatterPlugin;
|
82
|
-
private final OutputPlugin.Control nextControl;
|
83
|
-
|
84
|
-
public RunnerControl(Schema schema, RunnerTask task, OutputPlugin.Control nextControl)
|
85
|
-
{
|
86
|
-
this.schema = schema;
|
87
|
-
this.task = task;
|
88
|
-
// create plugins earlier than run() to throw exceptions early
|
89
|
-
this.encoderPlugins = newEncoderPlugins(task);
|
90
|
-
this.formatterPlugin = newFormatterPlugin(task);
|
91
|
-
this.nextControl = nextControl;
|
92
|
-
}
|
93
|
-
|
94
|
-
@Override
|
95
|
-
public List<TaskReport> run(final TaskSource fileOutputTaskSource)
|
96
|
-
{
|
97
|
-
final List<TaskReport> taskReports = new ArrayList<TaskReport>();
|
98
|
-
Encoders.transaction(encoderPlugins, task.getEncoderConfigs(), new Encoders.Control() {
|
99
|
-
public void run(final List<TaskSource> encoderTaskSources)
|
100
|
-
{
|
101
|
-
formatterPlugin.transaction(task.getFormatterConfig(), schema, new FormatterPlugin.Control() {
|
102
|
-
public void run(final TaskSource formatterTaskSource)
|
103
|
-
{
|
104
|
-
task.setFileOutputTaskSource(fileOutputTaskSource);
|
105
|
-
task.setEncoderTaskSources(encoderTaskSources);
|
106
|
-
task.setFormatterTaskSource(formatterTaskSource);
|
107
|
-
taskReports.addAll(nextControl.run(task.dump()));
|
108
|
-
}
|
109
|
-
});
|
110
|
-
}
|
111
|
-
});
|
112
|
-
return taskReports;
|
113
|
-
}
|
114
|
-
}
|
115
|
-
|
116
|
-
public void cleanup(TaskSource taskSource,
|
117
|
-
Schema schema, int taskCount,
|
118
|
-
List<TaskReport> successtaskReports)
|
119
|
-
{
|
120
|
-
fileOutputPlugin.cleanup(taskSource, taskCount, successtaskReports);
|
121
|
-
}
|
122
|
-
|
123
|
-
@Override
|
124
|
-
public TransactionalPageOutput open(TaskSource taskSource, Schema schema, int taskIndex)
|
125
|
-
{
|
126
|
-
final RunnerTask task = taskSource.loadTask(RunnerTask.class);
|
127
|
-
List<EncoderPlugin> encoderPlugins = newEncoderPlugins(task);
|
128
|
-
FormatterPlugin formatterPlugin = newFormatterPlugin(task);
|
129
|
-
|
130
|
-
try (AbortTransactionResource aborter = new AbortTransactionResource()) {
|
131
|
-
try (CloseResource closer = new CloseResource()) {
|
132
|
-
TransactionalFileOutput finalOutput = PluginWrappers.transactionalFileOutput(
|
133
|
-
fileOutputPlugin.open(task.getFileOutputTaskSource(), taskIndex));
|
134
|
-
aborter.abortThis(finalOutput);
|
135
|
-
closer.closeThis(finalOutput);
|
136
|
-
|
137
|
-
FileOutput encodedOutput = Encoders.open(encoderPlugins, task.getEncoderTaskSources(), finalOutput);
|
138
|
-
closer.closeThis(encodedOutput);
|
139
|
-
|
140
|
-
PageOutput output = formatterPlugin.open(task.getFormatterTaskSource(), schema, encodedOutput);
|
141
|
-
closer.closeThis(output);
|
142
|
-
|
143
|
-
TransactionalPageOutput ret = new DelegateTransactionalPageOutput(finalOutput, output);
|
144
|
-
aborter.dontAbort();
|
145
|
-
closer.dontClose(); // ownership of output is transferred to caller (input plugin). the owner will close output.
|
146
|
-
return ret;
|
147
|
-
}
|
148
|
-
}
|
149
|
-
}
|
150
|
-
|
151
|
-
private static class DelegateTransactionalPageOutput
|
152
|
-
implements TransactionalPageOutput
|
153
|
-
{
|
154
|
-
private final Transactional tran;
|
155
|
-
private final PageOutput output;
|
156
|
-
|
157
|
-
public DelegateTransactionalPageOutput(Transactional tran, PageOutput output)
|
158
|
-
{
|
159
|
-
this.tran = tran;
|
160
|
-
this.output = output;
|
161
|
-
}
|
162
|
-
|
163
|
-
@Override
|
164
|
-
public void add(Page page)
|
165
|
-
{
|
166
|
-
output.add(page);
|
167
|
-
}
|
168
|
-
|
169
|
-
@Override
|
170
|
-
public void finish()
|
171
|
-
{
|
172
|
-
output.finish();
|
173
|
-
}
|
174
|
-
|
175
|
-
@Override
|
176
|
-
public void close()
|
177
|
-
{
|
178
|
-
output.close();
|
179
|
-
}
|
180
|
-
|
181
|
-
@Override
|
182
|
-
public void abort()
|
183
|
-
{
|
184
|
-
tran.abort();
|
185
|
-
}
|
186
|
-
|
187
|
-
@Override
|
188
|
-
public TaskReport commit()
|
189
|
-
{
|
190
|
-
// TODO check finished
|
191
|
-
return tran.commit();
|
192
|
-
}
|
193
|
-
}
|
194
|
-
|
195
|
-
public static TaskSource getFileOutputTaskSource(TaskSource runnerTaskSource)
|
196
|
-
{
|
197
|
-
return runnerTaskSource.loadTask(RunnerTask.class).getFileOutputTaskSource();
|
198
|
-
}
|
199
|
-
}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
package org.embulk.spi;
|
2
|
-
|
3
|
-
import org.embulk.config.TaskSource;
|
4
|
-
import org.embulk.config.ConfigSource;
|
5
|
-
|
6
|
-
public interface FilterPlugin
|
7
|
-
{
|
8
|
-
interface Control
|
9
|
-
{
|
10
|
-
void run(TaskSource taskSource, Schema outputSchema);
|
11
|
-
}
|
12
|
-
|
13
|
-
void transaction(ConfigSource config, Schema inputSchema,
|
14
|
-
FilterPlugin.Control control);
|
15
|
-
|
16
|
-
PageOutput open(TaskSource taskSource, Schema inputSchema,
|
17
|
-
Schema outputSchema, PageOutput output);
|
18
|
-
}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
package org.embulk.spi;
|
2
|
-
|
3
|
-
import org.embulk.config.TaskSource;
|
4
|
-
import org.embulk.config.ConfigSource;
|
5
|
-
|
6
|
-
public interface FormatterPlugin
|
7
|
-
{
|
8
|
-
interface Control
|
9
|
-
{
|
10
|
-
void run(TaskSource taskSource);
|
11
|
-
}
|
12
|
-
|
13
|
-
void transaction(ConfigSource config, Schema schema,
|
14
|
-
FormatterPlugin.Control control);
|
15
|
-
|
16
|
-
PageOutput open(TaskSource taskSource, Schema schema,
|
17
|
-
FileOutput output);
|
18
|
-
}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
package org.embulk.spi;
|
2
|
-
|
3
|
-
import java.util.List;
|
4
|
-
import org.embulk.config.TaskSource;
|
5
|
-
import org.embulk.config.ConfigSource;
|
6
|
-
import org.embulk.config.ConfigDiff;
|
7
|
-
import org.embulk.config.TaskReport;
|
8
|
-
|
9
|
-
public interface InputPlugin
|
10
|
-
{
|
11
|
-
interface Control
|
12
|
-
{
|
13
|
-
List<TaskReport> run(TaskSource taskSource,
|
14
|
-
Schema schema, int taskCount);
|
15
|
-
}
|
16
|
-
|
17
|
-
ConfigDiff transaction(ConfigSource config,
|
18
|
-
InputPlugin.Control control);
|
19
|
-
|
20
|
-
ConfigDiff resume(TaskSource taskSource,
|
21
|
-
Schema schema, int taskCount,
|
22
|
-
InputPlugin.Control control);
|
23
|
-
|
24
|
-
void cleanup(TaskSource taskSource,
|
25
|
-
Schema schema, int taskCount,
|
26
|
-
List<TaskReport> successTaskReports);
|
27
|
-
|
28
|
-
TaskReport run(TaskSource taskSource,
|
29
|
-
Schema schema, int taskIndex,
|
30
|
-
PageOutput output);
|
31
|
-
|
32
|
-
ConfigDiff guess(ConfigSource config);
|
33
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
package org.embulk.spi;
|
2
|
-
|
3
|
-
import java.util.List;
|
4
|
-
import org.embulk.config.TaskSource;
|
5
|
-
import org.embulk.config.ConfigSource;
|
6
|
-
import org.embulk.config.ConfigDiff;
|
7
|
-
import org.embulk.config.TaskReport;
|
8
|
-
|
9
|
-
public interface OutputPlugin
|
10
|
-
{
|
11
|
-
interface Control
|
12
|
-
{
|
13
|
-
List<TaskReport> run(TaskSource taskSource);
|
14
|
-
}
|
15
|
-
|
16
|
-
ConfigDiff transaction(ConfigSource config,
|
17
|
-
Schema schema, int taskCount,
|
18
|
-
OutputPlugin.Control control);
|
19
|
-
|
20
|
-
ConfigDiff resume(TaskSource taskSource,
|
21
|
-
Schema schema, int taskCount,
|
22
|
-
OutputPlugin.Control control);
|
23
|
-
|
24
|
-
void cleanup(TaskSource taskSource,
|
25
|
-
Schema schema, int taskCount,
|
26
|
-
List<TaskReport> successTaskReports);
|
27
|
-
|
28
|
-
TransactionalPageOutput open(TaskSource taskSource, Schema schema, int taskIndex);
|
29
|
-
}
|
@@ -1,86 +0,0 @@
|
|
1
|
-
package org.embulk.spi;
|
2
|
-
|
3
|
-
import java.util.List;
|
4
|
-
import org.msgpack.value.ImmutableValue;
|
5
|
-
|
6
|
-
/**
|
7
|
-
* Page is an in-process (in-JVM) container of data records.
|
8
|
-
*
|
9
|
-
* It serializes records to byte[] (in org.embulk.spi.Buffer) in order to:
|
10
|
-
* A) Avoid slowness by handling many Java Objects
|
11
|
-
* B) Avoid complexity by type-safe primitive arrays
|
12
|
-
* C) Track memory consumption by records
|
13
|
-
* D) Use off-heap memory
|
14
|
-
*
|
15
|
-
* (C) and (D) may not be so meaningful as of v0.7+ (or since earlier) as recent Embulk unlikely
|
16
|
-
* allocates so many Pages at the same time. Recent Embulk is streaming-driven instead of
|
17
|
-
* multithreaded queue-based.
|
18
|
-
*
|
19
|
-
* Page is NOT for inter-process communication. For multi-process execution such as MapReduce
|
20
|
-
* Executor, the executor plugin takes responsibility about interoperable serialization.
|
21
|
-
*/
|
22
|
-
public class Page
|
23
|
-
{
|
24
|
-
private final Buffer buffer;
|
25
|
-
private List<String> stringReferences;
|
26
|
-
private List<ImmutableValue> valueReferences;
|
27
|
-
|
28
|
-
protected Page(Buffer buffer)
|
29
|
-
{
|
30
|
-
this.buffer = buffer;
|
31
|
-
}
|
32
|
-
|
33
|
-
public static Page allocate(int length)
|
34
|
-
{
|
35
|
-
return new Page(Buffer.allocate(length));
|
36
|
-
}
|
37
|
-
|
38
|
-
public static Page wrap(Buffer buffer)
|
39
|
-
{
|
40
|
-
return new Page(buffer);
|
41
|
-
}
|
42
|
-
|
43
|
-
public Page setStringReferences(List<String> values)
|
44
|
-
{
|
45
|
-
this.stringReferences = values;
|
46
|
-
return this;
|
47
|
-
}
|
48
|
-
|
49
|
-
public Page setValueReferences(List<ImmutableValue> values)
|
50
|
-
{
|
51
|
-
this.valueReferences = values;
|
52
|
-
return this;
|
53
|
-
}
|
54
|
-
|
55
|
-
public List<String> getStringReferences()
|
56
|
-
{
|
57
|
-
// TODO used by mapreduce executor
|
58
|
-
return stringReferences;
|
59
|
-
}
|
60
|
-
|
61
|
-
public List<ImmutableValue> getValueReferences()
|
62
|
-
{
|
63
|
-
// TODO used by mapreduce executor
|
64
|
-
return valueReferences;
|
65
|
-
}
|
66
|
-
|
67
|
-
public String getStringReference(int index)
|
68
|
-
{
|
69
|
-
return stringReferences.get(index);
|
70
|
-
}
|
71
|
-
|
72
|
-
public ImmutableValue getValueReference(int index)
|
73
|
-
{
|
74
|
-
return valueReferences.get(index);
|
75
|
-
}
|
76
|
-
|
77
|
-
public void release()
|
78
|
-
{
|
79
|
-
buffer.release();
|
80
|
-
}
|
81
|
-
|
82
|
-
public Buffer buffer()
|
83
|
-
{
|
84
|
-
return buffer;
|
85
|
-
}
|
86
|
-
}
|
@@ -1,696 +0,0 @@
|
|
1
|
-
package org.embulk.spi;
|
2
|
-
|
3
|
-
import java.util.List;
|
4
|
-
import java.util.Arrays;
|
5
|
-
import java.util.ArrayList;
|
6
|
-
import io.airlift.slice.Slice;
|
7
|
-
import io.airlift.slice.Slices;
|
8
|
-
import org.embulk.spi.type.Type;
|
9
|
-
import org.embulk.spi.type.Types;
|
10
|
-
import org.msgpack.value.Value;
|
11
|
-
import org.msgpack.value.ImmutableValue;
|
12
|
-
import org.embulk.spi.time.Timestamp;
|
13
|
-
|
14
|
-
public class PageBuilder
|
15
|
-
implements AutoCloseable
|
16
|
-
{
|
17
|
-
private final BufferAllocator allocator;
|
18
|
-
private final PageOutput output;
|
19
|
-
private final Schema schema;
|
20
|
-
private final int[] columnOffsets;
|
21
|
-
private final int fixedRecordSize;
|
22
|
-
|
23
|
-
private Buffer buffer;
|
24
|
-
private Slice bufferSlice;
|
25
|
-
|
26
|
-
private int count;
|
27
|
-
private int position;
|
28
|
-
private final byte[] nullBitSet;
|
29
|
-
private final Row row;
|
30
|
-
private List<String> stringReferences = new ArrayList<>();
|
31
|
-
private List<ImmutableValue> valueReferences = new ArrayList<>();
|
32
|
-
private int referenceSize;
|
33
|
-
private int nextVariableLengthDataOffset;
|
34
|
-
|
35
|
-
public PageBuilder(BufferAllocator allocator, Schema schema, PageOutput output)
|
36
|
-
{
|
37
|
-
this.allocator = allocator;
|
38
|
-
this.output = output;
|
39
|
-
this.schema = schema;
|
40
|
-
this.columnOffsets = PageFormat.columnOffsets(schema);
|
41
|
-
this.nullBitSet = new byte[PageFormat.nullBitSetSize(schema)];
|
42
|
-
Arrays.fill(nullBitSet, (byte) -1);
|
43
|
-
this.row = Row.newRow(schema);
|
44
|
-
this.fixedRecordSize = PageFormat.recordHeaderSize(schema) + PageFormat.totalColumnSize(schema);
|
45
|
-
this.nextVariableLengthDataOffset = fixedRecordSize;
|
46
|
-
newBuffer();
|
47
|
-
}
|
48
|
-
|
49
|
-
private void newBuffer()
|
50
|
-
{
|
51
|
-
this.buffer = allocator.allocate(PageFormat.PAGE_HEADER_SIZE + fixedRecordSize);
|
52
|
-
this.bufferSlice = Slices.wrappedBuffer(buffer.array(), buffer.offset(), buffer.capacity());
|
53
|
-
this.count = 0;
|
54
|
-
this.position = PageFormat.PAGE_HEADER_SIZE;
|
55
|
-
this.stringReferences = new ArrayList<>();
|
56
|
-
this.valueReferences = new ArrayList<>();
|
57
|
-
this.referenceSize = 0;
|
58
|
-
}
|
59
|
-
|
60
|
-
public Schema getSchema()
|
61
|
-
{
|
62
|
-
return schema;
|
63
|
-
}
|
64
|
-
|
65
|
-
public void setNull(Column column)
|
66
|
-
{
|
67
|
-
setNull(column.getIndex());
|
68
|
-
}
|
69
|
-
|
70
|
-
public void setNull(int columnIndex)
|
71
|
-
{
|
72
|
-
row.setNull(columnIndex);
|
73
|
-
|
74
|
-
}
|
75
|
-
|
76
|
-
public void setBoolean(Column column, boolean value)
|
77
|
-
{
|
78
|
-
// TODO check type?
|
79
|
-
setBoolean(column.getIndex(), value);
|
80
|
-
}
|
81
|
-
|
82
|
-
public void setBoolean(int columnIndex, boolean value)
|
83
|
-
{
|
84
|
-
row.setBoolean(columnIndex, value);
|
85
|
-
}
|
86
|
-
|
87
|
-
public void setLong(Column column, long value)
|
88
|
-
{
|
89
|
-
// TODO check type?
|
90
|
-
setLong(column.getIndex(), value);
|
91
|
-
}
|
92
|
-
|
93
|
-
public void setLong(int columnIndex, long value)
|
94
|
-
{
|
95
|
-
row.setLong(columnIndex, value);
|
96
|
-
}
|
97
|
-
|
98
|
-
public void setDouble(Column column, double value)
|
99
|
-
{
|
100
|
-
// TODO check type?
|
101
|
-
setDouble(column.getIndex(), value);
|
102
|
-
}
|
103
|
-
|
104
|
-
public void setDouble(int columnIndex, double value)
|
105
|
-
{
|
106
|
-
row.setDouble(columnIndex, value);
|
107
|
-
}
|
108
|
-
|
109
|
-
public void setString(Column column, String value)
|
110
|
-
{
|
111
|
-
// TODO check type?
|
112
|
-
setString(column.getIndex(), value);
|
113
|
-
}
|
114
|
-
|
115
|
-
public void setString(int columnIndex, String value)
|
116
|
-
{
|
117
|
-
if (value == null) {
|
118
|
-
setNull(columnIndex);
|
119
|
-
}
|
120
|
-
else {
|
121
|
-
row.setString(columnIndex, value);
|
122
|
-
}
|
123
|
-
}
|
124
|
-
|
125
|
-
public void setJson(Column column, Value value)
|
126
|
-
{
|
127
|
-
// TODO check type?
|
128
|
-
setJson(column.getIndex(), value);
|
129
|
-
}
|
130
|
-
|
131
|
-
public void setJson(int columnIndex, Value value)
|
132
|
-
{
|
133
|
-
if (value == null) {
|
134
|
-
setNull(columnIndex);
|
135
|
-
}
|
136
|
-
else {
|
137
|
-
row.setJson(columnIndex, value);
|
138
|
-
}
|
139
|
-
}
|
140
|
-
|
141
|
-
public void setTimestamp(Column column, Timestamp value)
|
142
|
-
{
|
143
|
-
// TODO check type?
|
144
|
-
setTimestamp(column.getIndex(), value);
|
145
|
-
}
|
146
|
-
|
147
|
-
public void setTimestamp(int columnIndex, Timestamp value)
|
148
|
-
{
|
149
|
-
if (value == null) {
|
150
|
-
setNull(columnIndex);
|
151
|
-
}
|
152
|
-
else {
|
153
|
-
row.setTimestamp(columnIndex, value);
|
154
|
-
}
|
155
|
-
}
|
156
|
-
|
157
|
-
private void writeNull(int columnIndex)
|
158
|
-
{
|
159
|
-
nullBitSet[columnIndex >>> 3] |= (1 << (columnIndex & 7));
|
160
|
-
}
|
161
|
-
|
162
|
-
private void clearNull(int columnIndex)
|
163
|
-
{
|
164
|
-
nullBitSet[columnIndex >>> 3] &= ~(1 << (columnIndex & 7));
|
165
|
-
}
|
166
|
-
|
167
|
-
private void writeBoolean(int columnIndex, boolean value)
|
168
|
-
{
|
169
|
-
bufferSlice.setByte(getOffset(columnIndex), value ? (byte) 1 : (byte) 0);
|
170
|
-
clearNull(columnIndex);
|
171
|
-
}
|
172
|
-
|
173
|
-
private void writeLong(int columnIndex, long value)
|
174
|
-
{
|
175
|
-
bufferSlice.setLong(getOffset(columnIndex), value);
|
176
|
-
clearNull(columnIndex);
|
177
|
-
}
|
178
|
-
|
179
|
-
private void writeDouble(int columnIndex, double value)
|
180
|
-
{
|
181
|
-
bufferSlice.setDouble(getOffset(columnIndex), value);
|
182
|
-
clearNull(columnIndex);
|
183
|
-
}
|
184
|
-
|
185
|
-
private void writeString(int columnIndex, String value)
|
186
|
-
{
|
187
|
-
int index = stringReferences.size();
|
188
|
-
stringReferences.add(value);
|
189
|
-
bufferSlice.setInt(getOffset(columnIndex), index);
|
190
|
-
referenceSize += value.length() * 2 + 4; // assuming size of char = size of byte * 2 + length
|
191
|
-
clearNull(columnIndex);
|
192
|
-
}
|
193
|
-
|
194
|
-
private void writeJson(int columnIndex, Value value)
|
195
|
-
{
|
196
|
-
int index = valueReferences.size();
|
197
|
-
valueReferences.add(value.immutableValue());
|
198
|
-
bufferSlice.setInt(getOffset(columnIndex), index);
|
199
|
-
referenceSize += 256; // TODO how to estimate size of the value?
|
200
|
-
clearNull(columnIndex);
|
201
|
-
}
|
202
|
-
|
203
|
-
private void writeTimestamp(int columnIndex, Timestamp value)
|
204
|
-
{
|
205
|
-
int offset = getOffset(columnIndex);
|
206
|
-
bufferSlice.setLong(offset, value.getEpochSecond());
|
207
|
-
bufferSlice.setInt(offset + 8, value.getNano());
|
208
|
-
clearNull(columnIndex);
|
209
|
-
}
|
210
|
-
|
211
|
-
private int getOffset(int columnIndex)
|
212
|
-
{
|
213
|
-
return position + columnOffsets[columnIndex];
|
214
|
-
}
|
215
|
-
|
216
|
-
public void addRecord()
|
217
|
-
{
|
218
|
-
// record
|
219
|
-
row.write(this);
|
220
|
-
|
221
|
-
// record header
|
222
|
-
bufferSlice.setInt(position, nextVariableLengthDataOffset); // nextVariableLengthDataOffset means record size
|
223
|
-
bufferSlice.setBytes(position + 4, nullBitSet);
|
224
|
-
count++;
|
225
|
-
|
226
|
-
this.position += nextVariableLengthDataOffset;
|
227
|
-
this.nextVariableLengthDataOffset = fixedRecordSize;
|
228
|
-
Arrays.fill(nullBitSet, (byte) -1);
|
229
|
-
|
230
|
-
// flush if next record will not fit in this buffer
|
231
|
-
if (buffer.capacity() < position + nextVariableLengthDataOffset + referenceSize) {
|
232
|
-
flush();
|
233
|
-
}
|
234
|
-
}
|
235
|
-
|
236
|
-
private void doFlush()
|
237
|
-
{
|
238
|
-
if (buffer != null && count > 0) {
|
239
|
-
// write page header
|
240
|
-
bufferSlice.setInt(0, count);
|
241
|
-
buffer.limit(position);
|
242
|
-
|
243
|
-
// flush page
|
244
|
-
Page page = Page.wrap(buffer)
|
245
|
-
.setStringReferences(stringReferences)
|
246
|
-
.setValueReferences(valueReferences);
|
247
|
-
buffer = null;
|
248
|
-
bufferSlice = null;
|
249
|
-
output.add(page);
|
250
|
-
}
|
251
|
-
}
|
252
|
-
|
253
|
-
public void flush()
|
254
|
-
{
|
255
|
-
doFlush();
|
256
|
-
if (buffer == null) {
|
257
|
-
newBuffer();
|
258
|
-
}
|
259
|
-
}
|
260
|
-
|
261
|
-
public void finish()
|
262
|
-
{
|
263
|
-
doFlush();
|
264
|
-
output.finish();
|
265
|
-
}
|
266
|
-
|
267
|
-
@Override
|
268
|
-
public void close()
|
269
|
-
{
|
270
|
-
if (buffer != null) {
|
271
|
-
buffer.release();
|
272
|
-
buffer = null;
|
273
|
-
bufferSlice = null;
|
274
|
-
}
|
275
|
-
output.close();
|
276
|
-
}
|
277
|
-
|
278
|
-
/**
|
279
|
-
* Row is a container to stage values before adding into reference lists such as |stringReferences|.
|
280
|
-
*
|
281
|
-
* |Row| works as a buffer against plugins that may add values incorrectly without |PageBuilder#addRecord|.
|
282
|
-
* It accepts just one value per column while |PageBuilder| can double-store values regardless of columns.
|
283
|
-
* Double-stored values are overwritten.
|
284
|
-
*/
|
285
|
-
private static class Row
|
286
|
-
{
|
287
|
-
private static Row newRow(Schema schema)
|
288
|
-
{
|
289
|
-
ColumnValue[] values = new ColumnValue[schema.getColumnCount()];
|
290
|
-
for (Column column : schema.getColumns()) {
|
291
|
-
values[column.getIndex()] = newValue(column);
|
292
|
-
}
|
293
|
-
return new Row(values);
|
294
|
-
}
|
295
|
-
|
296
|
-
private static ColumnValue newValue(Column column)
|
297
|
-
{
|
298
|
-
Type type = column.getType();
|
299
|
-
if (type.equals(Types.BOOLEAN)) {
|
300
|
-
return new BooleanColumnValue(column);
|
301
|
-
}
|
302
|
-
else if (type.equals(Types.DOUBLE)) {
|
303
|
-
return new DoubleColumnValue(column);
|
304
|
-
}
|
305
|
-
else if (type.equals(Types.LONG)) {
|
306
|
-
return new LongColumnValue(column);
|
307
|
-
}
|
308
|
-
else if (type.equals(Types.STRING)) {
|
309
|
-
return new StringColumnValue(column);
|
310
|
-
}
|
311
|
-
else if (type.equals(Types.JSON)) {
|
312
|
-
return new JsonColumnValue(column);
|
313
|
-
}
|
314
|
-
else if (type.equals(Types.TIMESTAMP)) {
|
315
|
-
return new TimestampColumnValue(column);
|
316
|
-
}
|
317
|
-
else {
|
318
|
-
throw new IllegalStateException("Unsupported type " + type.getName());
|
319
|
-
}
|
320
|
-
}
|
321
|
-
|
322
|
-
private final ColumnValue[] values;
|
323
|
-
|
324
|
-
private Row(ColumnValue[] values)
|
325
|
-
{
|
326
|
-
this.values = values;
|
327
|
-
}
|
328
|
-
|
329
|
-
private void setNull(int columnIndex)
|
330
|
-
{
|
331
|
-
values[columnIndex].setNull();
|
332
|
-
}
|
333
|
-
|
334
|
-
private void setBoolean(int columnIndex, boolean value)
|
335
|
-
{
|
336
|
-
values[columnIndex].setBoolean(value);
|
337
|
-
}
|
338
|
-
|
339
|
-
private void setLong(int columnIndex, long value)
|
340
|
-
{
|
341
|
-
values[columnIndex].setLong(value);
|
342
|
-
}
|
343
|
-
|
344
|
-
private void setDouble(int columnIndex, double value)
|
345
|
-
{
|
346
|
-
values[columnIndex].setDouble(value);
|
347
|
-
}
|
348
|
-
|
349
|
-
private void setString(int columnIndex, String value)
|
350
|
-
{
|
351
|
-
values[columnIndex].setString(value);
|
352
|
-
}
|
353
|
-
|
354
|
-
private void setJson(int columnIndex, Value value)
|
355
|
-
{
|
356
|
-
values[columnIndex].setJson(value);
|
357
|
-
}
|
358
|
-
|
359
|
-
private void setTimestamp(int columnIndex, Timestamp value)
|
360
|
-
{
|
361
|
-
values[columnIndex].setTimestamp(value);
|
362
|
-
}
|
363
|
-
|
364
|
-
private void write(PageBuilder pageBuilder)
|
365
|
-
{
|
366
|
-
for (ColumnValue v : values) {
|
367
|
-
v.write(pageBuilder);
|
368
|
-
}
|
369
|
-
}
|
370
|
-
}
|
371
|
-
|
372
|
-
private interface ColumnValue
|
373
|
-
{
|
374
|
-
void setBoolean(boolean value);
|
375
|
-
|
376
|
-
void setLong(long value);
|
377
|
-
|
378
|
-
void setDouble(double value);
|
379
|
-
|
380
|
-
void setString(String value);
|
381
|
-
|
382
|
-
void setJson(Value value);
|
383
|
-
|
384
|
-
void setTimestamp(Timestamp value);
|
385
|
-
|
386
|
-
void setNull();
|
387
|
-
|
388
|
-
void write(PageBuilder pageBuilder);
|
389
|
-
}
|
390
|
-
|
391
|
-
private static abstract class AbstractColumnValue
|
392
|
-
implements ColumnValue
|
393
|
-
{
|
394
|
-
protected final Column column;
|
395
|
-
protected boolean isNull;
|
396
|
-
|
397
|
-
protected AbstractColumnValue(Column column)
|
398
|
-
{
|
399
|
-
this.column = column;
|
400
|
-
}
|
401
|
-
|
402
|
-
public void setBoolean(boolean value)
|
403
|
-
{
|
404
|
-
throw new IllegalStateException("Not reach here");
|
405
|
-
}
|
406
|
-
|
407
|
-
public void setLong(long value)
|
408
|
-
{
|
409
|
-
throw new IllegalStateException("Not reach here");
|
410
|
-
}
|
411
|
-
|
412
|
-
public void setDouble(double value)
|
413
|
-
{
|
414
|
-
throw new IllegalStateException("Not reach here");
|
415
|
-
}
|
416
|
-
|
417
|
-
public void setString(String value)
|
418
|
-
{
|
419
|
-
throw new IllegalStateException("Not reach here");
|
420
|
-
}
|
421
|
-
|
422
|
-
public void setJson(Value value)
|
423
|
-
{
|
424
|
-
throw new IllegalStateException("Not reach here");
|
425
|
-
}
|
426
|
-
|
427
|
-
public void setTimestamp(Timestamp value)
|
428
|
-
{
|
429
|
-
throw new IllegalStateException("Not reach here");
|
430
|
-
}
|
431
|
-
|
432
|
-
public void setNull()
|
433
|
-
{
|
434
|
-
isNull = true;
|
435
|
-
}
|
436
|
-
|
437
|
-
public void write(PageBuilder pageBuilder)
|
438
|
-
{
|
439
|
-
if (!isNull) {
|
440
|
-
writeNotNull(pageBuilder);
|
441
|
-
}
|
442
|
-
else {
|
443
|
-
pageBuilder.writeNull(column.getIndex());
|
444
|
-
}
|
445
|
-
}
|
446
|
-
|
447
|
-
protected abstract void writeNotNull(PageBuilder pageBuilder);
|
448
|
-
}
|
449
|
-
|
450
|
-
private static class BooleanColumnValue
|
451
|
-
extends AbstractColumnValue
|
452
|
-
{
|
453
|
-
private boolean value;
|
454
|
-
|
455
|
-
BooleanColumnValue(Column column)
|
456
|
-
{
|
457
|
-
super(column);
|
458
|
-
}
|
459
|
-
|
460
|
-
@Override
|
461
|
-
public void setBoolean(boolean value)
|
462
|
-
{
|
463
|
-
this.value = value;
|
464
|
-
this.isNull = false;
|
465
|
-
}
|
466
|
-
|
467
|
-
@Override
|
468
|
-
public void writeNotNull(PageBuilder pageBuilder)
|
469
|
-
{
|
470
|
-
pageBuilder.writeBoolean(column.getIndex(), value);
|
471
|
-
}
|
472
|
-
}
|
473
|
-
|
474
|
-
private static class LongColumnValue
|
475
|
-
extends AbstractColumnValue
|
476
|
-
{
|
477
|
-
private long value;
|
478
|
-
|
479
|
-
LongColumnValue(Column column)
|
480
|
-
{
|
481
|
-
super(column);
|
482
|
-
}
|
483
|
-
|
484
|
-
@Override
|
485
|
-
public void setLong(long value)
|
486
|
-
{
|
487
|
-
this.value = value;
|
488
|
-
this.isNull = false;
|
489
|
-
}
|
490
|
-
|
491
|
-
@Override
|
492
|
-
public void writeNotNull(PageBuilder pageBuilder)
|
493
|
-
{
|
494
|
-
pageBuilder.writeLong(column.getIndex(), value);
|
495
|
-
}
|
496
|
-
}
|
497
|
-
|
498
|
-
private static class DoubleColumnValue
|
499
|
-
extends AbstractColumnValue
|
500
|
-
{
|
501
|
-
private double value;
|
502
|
-
|
503
|
-
DoubleColumnValue(Column column)
|
504
|
-
{
|
505
|
-
super(column);
|
506
|
-
}
|
507
|
-
|
508
|
-
@Override
|
509
|
-
public void setDouble(double value)
|
510
|
-
{
|
511
|
-
this.value = value;
|
512
|
-
this.isNull = false;
|
513
|
-
}
|
514
|
-
|
515
|
-
@Override
|
516
|
-
public void writeNotNull(PageBuilder pageBuilder)
|
517
|
-
{
|
518
|
-
pageBuilder.writeDouble(column.getIndex(), value);
|
519
|
-
}
|
520
|
-
}
|
521
|
-
|
522
|
-
private static class StringColumnValue
|
523
|
-
extends AbstractColumnValue
|
524
|
-
{
|
525
|
-
private String value;
|
526
|
-
|
527
|
-
StringColumnValue(Column column)
|
528
|
-
{
|
529
|
-
super(column);
|
530
|
-
}
|
531
|
-
|
532
|
-
@Override
|
533
|
-
public void setString(String value)
|
534
|
-
{
|
535
|
-
this.value = value;
|
536
|
-
this.isNull = false;
|
537
|
-
}
|
538
|
-
|
539
|
-
@Override
|
540
|
-
public void writeNotNull(PageBuilder pageBuilder)
|
541
|
-
{
|
542
|
-
pageBuilder.writeString(column.getIndex(), value);
|
543
|
-
}
|
544
|
-
}
|
545
|
-
|
546
|
-
private static class JsonColumnValue
|
547
|
-
extends AbstractColumnValue
|
548
|
-
{
|
549
|
-
private Value value;
|
550
|
-
|
551
|
-
JsonColumnValue(Column column)
|
552
|
-
{
|
553
|
-
super(column);
|
554
|
-
}
|
555
|
-
|
556
|
-
@Override
|
557
|
-
public void setJson(Value value)
|
558
|
-
{
|
559
|
-
this.value = value;
|
560
|
-
this.isNull = false;
|
561
|
-
}
|
562
|
-
|
563
|
-
@Override
|
564
|
-
public void writeNotNull(PageBuilder pageBuilder)
|
565
|
-
{
|
566
|
-
pageBuilder.writeJson(column.getIndex(), value);
|
567
|
-
}
|
568
|
-
}
|
569
|
-
|
570
|
-
private static class TimestampColumnValue
|
571
|
-
extends AbstractColumnValue
|
572
|
-
{
|
573
|
-
private Timestamp value;
|
574
|
-
|
575
|
-
TimestampColumnValue(Column column)
|
576
|
-
{
|
577
|
-
super(column);
|
578
|
-
}
|
579
|
-
|
580
|
-
@Override
|
581
|
-
public void setTimestamp(Timestamp value)
|
582
|
-
{
|
583
|
-
this.value = value;
|
584
|
-
this.isNull = false;
|
585
|
-
}
|
586
|
-
|
587
|
-
@Override
|
588
|
-
public void writeNotNull(PageBuilder pageBuilder)
|
589
|
-
{
|
590
|
-
pageBuilder.writeTimestamp(column.getIndex(), value);
|
591
|
-
}
|
592
|
-
}
|
593
|
-
|
594
|
-
/* TODO for variable-length types
|
595
|
-
private void flushAndTakeOverRemaingData()
|
596
|
-
{
|
597
|
-
if (page != null) {
|
598
|
-
// page header
|
599
|
-
page.setInt(0, count);
|
600
|
-
|
601
|
-
Page lastPage = page;
|
602
|
-
|
603
|
-
this.page = allocator.allocatePage(Page.PAGE_HEADER_SIZE + fixedRecordSize + nextVariableLengthDataOffset);
|
604
|
-
page.setBytes(Page.PAGE_HEADER_SIZE, lastPage, position, nextVariableLengthDataOffset);
|
605
|
-
this.count = 0;
|
606
|
-
this.position = Page.PAGE_HEADER_SIZE;
|
607
|
-
|
608
|
-
output.add(lastPage);
|
609
|
-
}
|
610
|
-
}
|
611
|
-
|
612
|
-
public int getVariableLengthDataOffset()
|
613
|
-
{
|
614
|
-
return nextVariableLengthDataOffset;
|
615
|
-
}
|
616
|
-
|
617
|
-
public VariableLengthDataWriter setVariableLengthData(int columnIndex, int intData)
|
618
|
-
{
|
619
|
-
// Page.VARIABLE_LENGTH_COLUMN_SIZE is 4 bytes
|
620
|
-
page.setInt(position + columnOffsets[columnIndex], intData);
|
621
|
-
return new VariableLengthDataWriter(nextVariableLengthDataOffset);
|
622
|
-
}
|
623
|
-
|
624
|
-
Page ensureVariableLengthDataCapacity(int requiredOffsetFromPosition)
|
625
|
-
{
|
626
|
-
if (page.capacity() < position + requiredOffsetFromPosition) {
|
627
|
-
flushAndTakeOverRemaingData();
|
628
|
-
}
|
629
|
-
return page;
|
630
|
-
}
|
631
|
-
|
632
|
-
public class VariableLengthDataWriter
|
633
|
-
{
|
634
|
-
private int offsetFromPosition;
|
635
|
-
|
636
|
-
VariableLengthDataWriter(int offsetFromPosition)
|
637
|
-
{
|
638
|
-
this.offsetFromPosition = offsetFromPosition;
|
639
|
-
}
|
640
|
-
|
641
|
-
public void writeByte(byte value)
|
642
|
-
{
|
643
|
-
ensureVariableLengthDataCapacity(offsetFromPosition + 1);
|
644
|
-
page.setByte(position + offsetFromPosition, value);
|
645
|
-
offsetFromPosition += 1;
|
646
|
-
}
|
647
|
-
|
648
|
-
public void writeShort(short value)
|
649
|
-
{
|
650
|
-
ensureVariableLengthDataCapacity(offsetFromPosition + 2);
|
651
|
-
page.setShort(position + offsetFromPosition, value);
|
652
|
-
offsetFromPosition += 2;
|
653
|
-
}
|
654
|
-
|
655
|
-
public void writeInt(int value)
|
656
|
-
{
|
657
|
-
ensureVariableLengthDataCapacity(offsetFromPosition + 4);
|
658
|
-
page.setInt(position + offsetFromPosition, value);
|
659
|
-
offsetFromPosition += 4;
|
660
|
-
}
|
661
|
-
|
662
|
-
public void writeLong(long value)
|
663
|
-
{
|
664
|
-
ensureVariableLengthDataCapacity(offsetFromPosition + 8);
|
665
|
-
page.setLong(position + offsetFromPosition, value);
|
666
|
-
offsetFromPosition += 8;
|
667
|
-
}
|
668
|
-
|
669
|
-
public void writeFloat(float value)
|
670
|
-
{
|
671
|
-
ensureVariableLengthDataCapacity(offsetFromPosition + 4);
|
672
|
-
page.setFloat(position + offsetFromPosition, value);
|
673
|
-
offsetFromPosition += 4;
|
674
|
-
}
|
675
|
-
|
676
|
-
public void writeDouble(double value)
|
677
|
-
{
|
678
|
-
ensureVariableLengthDataCapacity(offsetFromPosition + 8);
|
679
|
-
page.setDouble(position + offsetFromPosition, value);
|
680
|
-
offsetFromPosition += 8;
|
681
|
-
}
|
682
|
-
|
683
|
-
public void writeBytes(byte[] data)
|
684
|
-
{
|
685
|
-
writeBytes(data, 0, data.length);
|
686
|
-
}
|
687
|
-
|
688
|
-
public void writeBytes(byte[] data, int off, int len)
|
689
|
-
{
|
690
|
-
ensureVariableLengthDataCapacity(offsetFromPosition + len);
|
691
|
-
page.setBytes(position + offsetFromPosition, data, off, len);
|
692
|
-
offsetFromPosition += len;
|
693
|
-
}
|
694
|
-
}
|
695
|
-
*/
|
696
|
-
}
|