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,416 +0,0 @@
|
|
1
|
-
package org.embulk.standards;
|
2
|
-
|
3
|
-
import com.google.common.base.Optional;
|
4
|
-
import com.google.common.collect.ImmutableSet;
|
5
|
-
import com.fasterxml.jackson.annotation.JsonCreator;
|
6
|
-
import com.fasterxml.jackson.annotation.JsonIgnore;
|
7
|
-
import com.fasterxml.jackson.annotation.JsonValue;
|
8
|
-
import org.embulk.config.Task;
|
9
|
-
import org.embulk.config.Config;
|
10
|
-
import org.embulk.config.ConfigDefault;
|
11
|
-
import org.embulk.config.ConfigSource;
|
12
|
-
import org.embulk.config.ConfigException;
|
13
|
-
import org.embulk.config.TaskSource;
|
14
|
-
import org.embulk.spi.time.TimestampParser;
|
15
|
-
import org.embulk.spi.time.TimestampParseException;
|
16
|
-
import org.embulk.spi.json.JsonParser;
|
17
|
-
import org.embulk.spi.json.JsonParseException;
|
18
|
-
import org.embulk.spi.Column;
|
19
|
-
import org.embulk.spi.Schema;
|
20
|
-
import org.embulk.spi.SchemaConfig;
|
21
|
-
import org.embulk.spi.ColumnVisitor;
|
22
|
-
import org.embulk.spi.PageBuilder;
|
23
|
-
import org.embulk.spi.ParserPlugin;
|
24
|
-
import org.embulk.spi.Exec;
|
25
|
-
import org.embulk.spi.FileInput;
|
26
|
-
import org.embulk.spi.PageOutput;
|
27
|
-
import org.embulk.spi.DataException;
|
28
|
-
import org.embulk.spi.util.LineDecoder;
|
29
|
-
import org.embulk.spi.util.Timestamps;
|
30
|
-
import org.slf4j.Logger;
|
31
|
-
|
32
|
-
public class CsvParserPlugin
|
33
|
-
implements ParserPlugin
|
34
|
-
{
|
35
|
-
private static final ImmutableSet<String> TRUE_STRINGS =
|
36
|
-
ImmutableSet.of(
|
37
|
-
"true", "True", "TRUE",
|
38
|
-
"yes", "Yes", "YES",
|
39
|
-
"t", "T", "y", "Y",
|
40
|
-
"on", "On", "ON",
|
41
|
-
"1");
|
42
|
-
|
43
|
-
public interface PluginTask
|
44
|
-
extends Task, LineDecoder.DecoderTask, TimestampParser.Task
|
45
|
-
{
|
46
|
-
@Config("columns")
|
47
|
-
SchemaConfig getSchemaConfig();
|
48
|
-
|
49
|
-
@Config("header_line")
|
50
|
-
@ConfigDefault("null")
|
51
|
-
Optional<Boolean> getHeaderLine();
|
52
|
-
|
53
|
-
@Config("skip_header_lines")
|
54
|
-
@ConfigDefault("0")
|
55
|
-
int getSkipHeaderLines();
|
56
|
-
void setSkipHeaderLines(int n);
|
57
|
-
|
58
|
-
@Config("delimiter")
|
59
|
-
@ConfigDefault("\",\"")
|
60
|
-
String getDelimiter();
|
61
|
-
|
62
|
-
@Config("quote")
|
63
|
-
@ConfigDefault("\"\\\"\"")
|
64
|
-
Optional<QuoteCharacter> getQuoteChar();
|
65
|
-
|
66
|
-
@Config("escape")
|
67
|
-
@ConfigDefault("\"\\\\\"")
|
68
|
-
Optional<EscapeCharacter> getEscapeChar();
|
69
|
-
|
70
|
-
// Null value handling: if the CsvParser found 'non-quoted empty string's,
|
71
|
-
// it replaces them to string that users specified like "\N", "NULL".
|
72
|
-
@Config("null_string")
|
73
|
-
@ConfigDefault("null")
|
74
|
-
Optional<String> getNullString();
|
75
|
-
|
76
|
-
@Config("trim_if_not_quoted")
|
77
|
-
@ConfigDefault("false")
|
78
|
-
boolean getTrimIfNotQuoted();
|
79
|
-
|
80
|
-
@Config("quotes_in_quoted_fields")
|
81
|
-
@ConfigDefault("\"ACCEPT_ONLY_RFC4180_ESCAPED\"")
|
82
|
-
QuotesInQuotedFields getQuotesInQuotedFields();
|
83
|
-
|
84
|
-
@Config("max_quoted_size_limit")
|
85
|
-
@ConfigDefault("131072") //128kB
|
86
|
-
long getMaxQuotedSizeLimit();
|
87
|
-
|
88
|
-
@Config("comment_line_marker")
|
89
|
-
@ConfigDefault("null")
|
90
|
-
Optional<String> getCommentLineMarker();
|
91
|
-
|
92
|
-
@Config("allow_optional_columns")
|
93
|
-
@ConfigDefault("false")
|
94
|
-
boolean getAllowOptionalColumns();
|
95
|
-
|
96
|
-
@Config("allow_extra_columns")
|
97
|
-
@ConfigDefault("false")
|
98
|
-
boolean getAllowExtraColumns();
|
99
|
-
|
100
|
-
@Config("stop_on_invalid_record")
|
101
|
-
@ConfigDefault("false")
|
102
|
-
boolean getStopOnInvalidRecord();
|
103
|
-
}
|
104
|
-
|
105
|
-
public enum QuotesInQuotedFields
|
106
|
-
{
|
107
|
-
ACCEPT_ONLY_RFC4180_ESCAPED,
|
108
|
-
ACCEPT_STRAY_QUOTES_ASSUMING_NO_DELIMITERS_IN_FIELDS,
|
109
|
-
;
|
110
|
-
|
111
|
-
@JsonCreator
|
112
|
-
public static QuotesInQuotedFields ofString(final String string)
|
113
|
-
{
|
114
|
-
for (final QuotesInQuotedFields value : values()) {
|
115
|
-
if (string.equals(value.toString())) {
|
116
|
-
return value;
|
117
|
-
}
|
118
|
-
}
|
119
|
-
throw new ConfigException("\"quotes_in_quoted_fields\" must be one of [ACCEPT_ONLY_RFC4180_ESCAPED, ACCEPT_STRAY_QUOTES_ASSUMING_NO_DELIMITERS_IN_FIELDS].");
|
120
|
-
}
|
121
|
-
}
|
122
|
-
|
123
|
-
public static class QuoteCharacter
|
124
|
-
{
|
125
|
-
private final char character;
|
126
|
-
|
127
|
-
public QuoteCharacter(char character)
|
128
|
-
{
|
129
|
-
this.character = character;
|
130
|
-
}
|
131
|
-
|
132
|
-
public static QuoteCharacter noQuote()
|
133
|
-
{
|
134
|
-
return new QuoteCharacter(CsvTokenizer.NO_QUOTE);
|
135
|
-
}
|
136
|
-
|
137
|
-
@JsonCreator
|
138
|
-
public static QuoteCharacter ofString(String str)
|
139
|
-
{
|
140
|
-
if (str.length() >= 2) {
|
141
|
-
throw new ConfigException("\"quote\" option accepts only 1 character.");
|
142
|
-
} else if (str.isEmpty()) {
|
143
|
-
Exec.getLogger(CsvParserPlugin.class).warn("Setting '' (empty string) to \"quote\" option is obsoleted. Currently it becomes '\"' automatically but this behavior will be removed. Please set '\"' explicitly.");
|
144
|
-
return new QuoteCharacter('"');
|
145
|
-
} else {
|
146
|
-
return new QuoteCharacter(str.charAt(0));
|
147
|
-
}
|
148
|
-
}
|
149
|
-
|
150
|
-
@JsonIgnore
|
151
|
-
public char getCharacter()
|
152
|
-
{
|
153
|
-
return character;
|
154
|
-
}
|
155
|
-
|
156
|
-
@JsonValue
|
157
|
-
public String getOptionalString()
|
158
|
-
{
|
159
|
-
return new String(new char[] { character });
|
160
|
-
}
|
161
|
-
|
162
|
-
@Override
|
163
|
-
public boolean equals(Object obj)
|
164
|
-
{
|
165
|
-
if (!(obj instanceof QuoteCharacter)) {
|
166
|
-
return false;
|
167
|
-
}
|
168
|
-
QuoteCharacter o = (QuoteCharacter) obj;
|
169
|
-
return character == o.character;
|
170
|
-
}
|
171
|
-
}
|
172
|
-
|
173
|
-
public static class EscapeCharacter
|
174
|
-
{
|
175
|
-
private final char character;
|
176
|
-
|
177
|
-
public EscapeCharacter(char character)
|
178
|
-
{
|
179
|
-
this.character = character;
|
180
|
-
}
|
181
|
-
|
182
|
-
public static EscapeCharacter noEscape()
|
183
|
-
{
|
184
|
-
return new EscapeCharacter(CsvTokenizer.NO_ESCAPE);
|
185
|
-
}
|
186
|
-
|
187
|
-
@JsonCreator
|
188
|
-
public static EscapeCharacter ofString(String str)
|
189
|
-
{
|
190
|
-
if (str.length() >= 2) {
|
191
|
-
throw new ConfigException("\"escape\" option accepts only 1 character.");
|
192
|
-
} else if (str.isEmpty()) {
|
193
|
-
Exec.getLogger(CsvParserPlugin.class).warn("Setting '' (empty string) to \"escape\" option is obsoleted. Currently it becomes null automatically but this behavior will be removed. Please set \"escape: null\" explicitly.");
|
194
|
-
return noEscape();
|
195
|
-
} else {
|
196
|
-
return new EscapeCharacter(str.charAt(0));
|
197
|
-
}
|
198
|
-
}
|
199
|
-
|
200
|
-
@JsonIgnore
|
201
|
-
public char getCharacter()
|
202
|
-
{
|
203
|
-
return character;
|
204
|
-
}
|
205
|
-
|
206
|
-
@JsonValue
|
207
|
-
public String getOptionalString()
|
208
|
-
{
|
209
|
-
return new String(new char[] { character });
|
210
|
-
}
|
211
|
-
|
212
|
-
@Override
|
213
|
-
public boolean equals(Object obj)
|
214
|
-
{
|
215
|
-
if (!(obj instanceof EscapeCharacter)) {
|
216
|
-
return false;
|
217
|
-
}
|
218
|
-
EscapeCharacter o = (EscapeCharacter) obj;
|
219
|
-
return character == o.character;
|
220
|
-
}
|
221
|
-
}
|
222
|
-
|
223
|
-
private final Logger log;
|
224
|
-
|
225
|
-
public CsvParserPlugin()
|
226
|
-
{
|
227
|
-
log = Exec.getLogger(CsvParserPlugin.class);
|
228
|
-
}
|
229
|
-
|
230
|
-
@Override
|
231
|
-
public void transaction(ConfigSource config, ParserPlugin.Control control)
|
232
|
-
{
|
233
|
-
PluginTask task = config.loadConfig(PluginTask.class);
|
234
|
-
|
235
|
-
// backward compatibility
|
236
|
-
if (task.getHeaderLine().isPresent()) {
|
237
|
-
if (task.getSkipHeaderLines() > 0) {
|
238
|
-
throw new ConfigException("'header_line' option is invalid if 'skip_header_lines' is set.");
|
239
|
-
}
|
240
|
-
if (task.getHeaderLine().get()) {
|
241
|
-
task.setSkipHeaderLines(1);
|
242
|
-
} else {
|
243
|
-
task.setSkipHeaderLines(0);
|
244
|
-
}
|
245
|
-
}
|
246
|
-
|
247
|
-
control.run(task.dump(), task.getSchemaConfig().toSchema());
|
248
|
-
}
|
249
|
-
|
250
|
-
@Override
|
251
|
-
public void run(TaskSource taskSource, final Schema schema,
|
252
|
-
FileInput input, PageOutput output)
|
253
|
-
{
|
254
|
-
PluginTask task = taskSource.loadTask(PluginTask.class);
|
255
|
-
final TimestampParser[] timestampParsers = Timestamps.newTimestampColumnParsers(task, task.getSchemaConfig());
|
256
|
-
final JsonParser jsonParser = new JsonParser();
|
257
|
-
final CsvTokenizer tokenizer = new CsvTokenizer(new LineDecoder(input, task), task);
|
258
|
-
final boolean allowOptionalColumns = task.getAllowOptionalColumns();
|
259
|
-
final boolean allowExtraColumns = task.getAllowExtraColumns();
|
260
|
-
final boolean stopOnInvalidRecord = task.getStopOnInvalidRecord();
|
261
|
-
final int skipHeaderLines = task.getSkipHeaderLines();
|
262
|
-
|
263
|
-
try (final PageBuilder pageBuilder = new PageBuilder(Exec.getBufferAllocator(), schema, output)) {
|
264
|
-
while (tokenizer.nextFile()) {
|
265
|
-
// skip the header lines for each file
|
266
|
-
for (int skipHeaderLineNumber = skipHeaderLines; skipHeaderLineNumber > 0; skipHeaderLineNumber--) {
|
267
|
-
if (!tokenizer.skipHeaderLine()) {
|
268
|
-
break;
|
269
|
-
}
|
270
|
-
}
|
271
|
-
|
272
|
-
if (!tokenizer.nextRecord()) {
|
273
|
-
// empty file
|
274
|
-
continue;
|
275
|
-
}
|
276
|
-
|
277
|
-
while (true) {
|
278
|
-
boolean hasNextRecord;
|
279
|
-
|
280
|
-
try {
|
281
|
-
schema.visitColumns(new ColumnVisitor() {
|
282
|
-
public void booleanColumn(Column column)
|
283
|
-
{
|
284
|
-
String v = nextColumn();
|
285
|
-
if (v == null) {
|
286
|
-
pageBuilder.setNull(column);
|
287
|
-
} else {
|
288
|
-
pageBuilder.setBoolean(column, TRUE_STRINGS.contains(v));
|
289
|
-
}
|
290
|
-
}
|
291
|
-
|
292
|
-
public void longColumn(Column column)
|
293
|
-
{
|
294
|
-
String v = nextColumn();
|
295
|
-
if (v == null) {
|
296
|
-
pageBuilder.setNull(column);
|
297
|
-
} else {
|
298
|
-
try {
|
299
|
-
pageBuilder.setLong(column, Long.parseLong(v));
|
300
|
-
} catch (NumberFormatException e) {
|
301
|
-
// TODO support default value
|
302
|
-
throw new CsvRecordValidateException(e);
|
303
|
-
}
|
304
|
-
}
|
305
|
-
}
|
306
|
-
|
307
|
-
public void doubleColumn(Column column)
|
308
|
-
{
|
309
|
-
String v = nextColumn();
|
310
|
-
if (v == null) {
|
311
|
-
pageBuilder.setNull(column);
|
312
|
-
} else {
|
313
|
-
try {
|
314
|
-
pageBuilder.setDouble(column, Double.parseDouble(v));
|
315
|
-
} catch (NumberFormatException e) {
|
316
|
-
// TODO support default value
|
317
|
-
throw new CsvRecordValidateException(e);
|
318
|
-
}
|
319
|
-
}
|
320
|
-
}
|
321
|
-
|
322
|
-
public void stringColumn(Column column)
|
323
|
-
{
|
324
|
-
String v = nextColumn();
|
325
|
-
if (v == null) {
|
326
|
-
pageBuilder.setNull(column);
|
327
|
-
} else {
|
328
|
-
pageBuilder.setString(column, v);
|
329
|
-
}
|
330
|
-
}
|
331
|
-
|
332
|
-
public void timestampColumn(Column column)
|
333
|
-
{
|
334
|
-
String v = nextColumn();
|
335
|
-
if (v == null) {
|
336
|
-
pageBuilder.setNull(column);
|
337
|
-
} else {
|
338
|
-
try {
|
339
|
-
pageBuilder.setTimestamp(column, timestampParsers[column.getIndex()].parse(v));
|
340
|
-
} catch (TimestampParseException e) {
|
341
|
-
// TODO support default value
|
342
|
-
throw new CsvRecordValidateException(e);
|
343
|
-
}
|
344
|
-
}
|
345
|
-
}
|
346
|
-
|
347
|
-
public void jsonColumn(Column column)
|
348
|
-
{
|
349
|
-
String v = nextColumn();
|
350
|
-
if (v == null) {
|
351
|
-
pageBuilder.setNull(column);
|
352
|
-
} else {
|
353
|
-
try {
|
354
|
-
pageBuilder.setJson(column, jsonParser.parse(v));
|
355
|
-
} catch (JsonParseException e) {
|
356
|
-
// TODO support default value
|
357
|
-
throw new CsvRecordValidateException(e);
|
358
|
-
}
|
359
|
-
}
|
360
|
-
}
|
361
|
-
|
362
|
-
private String nextColumn()
|
363
|
-
{
|
364
|
-
if (allowOptionalColumns && !tokenizer.hasNextColumn()) {
|
365
|
-
//TODO warning
|
366
|
-
return null;
|
367
|
-
}
|
368
|
-
return tokenizer.nextColumnOrNull();
|
369
|
-
}
|
370
|
-
});
|
371
|
-
|
372
|
-
try {
|
373
|
-
hasNextRecord = tokenizer.nextRecord();
|
374
|
-
} catch (CsvTokenizer.TooManyColumnsException ex) {
|
375
|
-
if (allowExtraColumns) {
|
376
|
-
String tooManyColumnsLine = tokenizer.skipCurrentLine();
|
377
|
-
// TODO warning
|
378
|
-
hasNextRecord = tokenizer.nextRecord();
|
379
|
-
} else {
|
380
|
-
// this line will be skipped at the following catch section
|
381
|
-
throw ex;
|
382
|
-
}
|
383
|
-
}
|
384
|
-
pageBuilder.addRecord();
|
385
|
-
|
386
|
-
} catch (CsvTokenizer.InvalidFormatException | CsvTokenizer.InvalidValueException | CsvRecordValidateException e) {
|
387
|
-
String skippedLine = tokenizer.skipCurrentLine();
|
388
|
-
long lineNumber = tokenizer.getCurrentLineNumber();
|
389
|
-
if (stopOnInvalidRecord) {
|
390
|
-
throw new DataException(String.format("Invalid record at line %d: %s", lineNumber, skippedLine), e);
|
391
|
-
}
|
392
|
-
log.warn(String.format("Skipped line %d (%s): %s", lineNumber, e.getMessage(), skippedLine));
|
393
|
-
//exec.notice().skippedLine(skippedLine);
|
394
|
-
|
395
|
-
hasNextRecord = tokenizer.nextRecord();
|
396
|
-
}
|
397
|
-
|
398
|
-
if (!hasNextRecord) {
|
399
|
-
break;
|
400
|
-
}
|
401
|
-
}
|
402
|
-
}
|
403
|
-
|
404
|
-
pageBuilder.finish();
|
405
|
-
}
|
406
|
-
}
|
407
|
-
|
408
|
-
static class CsvRecordValidateException
|
409
|
-
extends DataException
|
410
|
-
{
|
411
|
-
CsvRecordValidateException(Throwable cause)
|
412
|
-
{
|
413
|
-
super(cause);
|
414
|
-
}
|
415
|
-
}
|
416
|
-
}
|
@@ -1,545 +0,0 @@
|
|
1
|
-
package org.embulk.standards;
|
2
|
-
|
3
|
-
import com.google.common.base.Preconditions;
|
4
|
-
import java.util.List;
|
5
|
-
import java.util.ArrayList;
|
6
|
-
import java.util.Deque;
|
7
|
-
import java.util.ArrayDeque;
|
8
|
-
import org.embulk.spi.DataException;
|
9
|
-
import org.embulk.spi.util.LineDecoder;
|
10
|
-
import org.embulk.config.ConfigException;
|
11
|
-
import org.embulk.standards.CsvParserPlugin.QuotesInQuotedFields;
|
12
|
-
|
13
|
-
public class CsvTokenizer
|
14
|
-
{
|
15
|
-
static enum RecordState
|
16
|
-
{
|
17
|
-
NOT_END, END,
|
18
|
-
}
|
19
|
-
|
20
|
-
static enum ColumnState
|
21
|
-
{
|
22
|
-
BEGIN, VALUE, QUOTED_VALUE, AFTER_QUOTED_VALUE, FIRST_TRIM, LAST_TRIM_OR_VALUE,
|
23
|
-
}
|
24
|
-
|
25
|
-
private static final char END_OF_LINE = '\0';
|
26
|
-
static final char NO_QUOTE = '\0';
|
27
|
-
static final char NO_ESCAPE = '\0';
|
28
|
-
|
29
|
-
private final char delimiterChar;
|
30
|
-
private final String delimiterFollowingString;
|
31
|
-
private final char quote;
|
32
|
-
private final char escape;
|
33
|
-
private final String newline;
|
34
|
-
private final boolean trimIfNotQuoted;
|
35
|
-
private final QuotesInQuotedFields quotesInQuotedFields;
|
36
|
-
private final long maxQuotedSizeLimit;
|
37
|
-
private final String commentLineMarker;
|
38
|
-
private final LineDecoder input;
|
39
|
-
private final String nullStringOrNull;
|
40
|
-
|
41
|
-
private RecordState recordState = RecordState.END; // initial state is end of a record. nextRecord() must be called first
|
42
|
-
private long lineNumber = 0;
|
43
|
-
|
44
|
-
private String line = null;
|
45
|
-
private int linePos = 0;
|
46
|
-
private boolean wasQuotedColumn = false;
|
47
|
-
private List<String> quotedValueLines = new ArrayList<>();
|
48
|
-
private Deque<String> unreadLines = new ArrayDeque<>();
|
49
|
-
|
50
|
-
public CsvTokenizer(LineDecoder input, CsvParserPlugin.PluginTask task)
|
51
|
-
{
|
52
|
-
String delimiter = task.getDelimiter();
|
53
|
-
if (delimiter.length() == 0) {
|
54
|
-
throw new ConfigException("Empty delimiter is not allowed");
|
55
|
-
} else {
|
56
|
-
this.delimiterChar = delimiter.charAt(0);
|
57
|
-
if (delimiter.length() > 1) {
|
58
|
-
delimiterFollowingString = delimiter.substring(1);
|
59
|
-
} else {
|
60
|
-
delimiterFollowingString = null;
|
61
|
-
}
|
62
|
-
}
|
63
|
-
quote = task.getQuoteChar().or(CsvParserPlugin.QuoteCharacter.noQuote()).getCharacter();
|
64
|
-
escape = task.getEscapeChar().or(CsvParserPlugin.EscapeCharacter.noEscape()).getCharacter();
|
65
|
-
newline = task.getNewline().getString();
|
66
|
-
trimIfNotQuoted = task.getTrimIfNotQuoted();
|
67
|
-
quotesInQuotedFields = task.getQuotesInQuotedFields();
|
68
|
-
if (trimIfNotQuoted && quotesInQuotedFields != QuotesInQuotedFields.ACCEPT_ONLY_RFC4180_ESCAPED) {
|
69
|
-
// The combination makes some syntax very ambiguous such as:
|
70
|
-
// val1, \"\"val2\"\" ,val3
|
71
|
-
throw new ConfigException("[quotes_in_quoted_fields != ACCEPT_ONLY_RFC4180_ESCAPED] is not allowed to specify with [trim_if_not_quoted = true]");
|
72
|
-
}
|
73
|
-
maxQuotedSizeLimit = task.getMaxQuotedSizeLimit();
|
74
|
-
commentLineMarker = task.getCommentLineMarker().orNull();
|
75
|
-
nullStringOrNull = task.getNullString().orNull();
|
76
|
-
this.input = input;
|
77
|
-
}
|
78
|
-
|
79
|
-
public long getCurrentLineNumber()
|
80
|
-
{
|
81
|
-
return lineNumber;
|
82
|
-
}
|
83
|
-
|
84
|
-
public boolean skipHeaderLine()
|
85
|
-
{
|
86
|
-
boolean skipped = input.poll() != null;
|
87
|
-
if (skipped) {
|
88
|
-
lineNumber++;
|
89
|
-
}
|
90
|
-
return skipped;
|
91
|
-
}
|
92
|
-
|
93
|
-
// returns skipped line
|
94
|
-
public String skipCurrentLine()
|
95
|
-
{
|
96
|
-
String skippedLine;
|
97
|
-
if (quotedValueLines.isEmpty()) {
|
98
|
-
skippedLine = line;
|
99
|
-
} else {
|
100
|
-
// recover lines of quoted value
|
101
|
-
skippedLine = quotedValueLines.remove(0); // TODO optimize performance
|
102
|
-
unreadLines.addAll(quotedValueLines);
|
103
|
-
lineNumber -= quotedValueLines.size();
|
104
|
-
if (line != null) {
|
105
|
-
unreadLines.add(line);
|
106
|
-
lineNumber -= 1;
|
107
|
-
}
|
108
|
-
quotedValueLines.clear();
|
109
|
-
}
|
110
|
-
recordState = RecordState.END;
|
111
|
-
return skippedLine;
|
112
|
-
}
|
113
|
-
|
114
|
-
public boolean nextFile()
|
115
|
-
{
|
116
|
-
boolean next = input.nextFile();
|
117
|
-
if (next) {
|
118
|
-
lineNumber = 0;
|
119
|
-
}
|
120
|
-
return next;
|
121
|
-
}
|
122
|
-
|
123
|
-
// used by guess-csv
|
124
|
-
public boolean nextRecord()
|
125
|
-
{
|
126
|
-
return nextRecord(true);
|
127
|
-
}
|
128
|
-
|
129
|
-
public boolean nextRecord(boolean skipEmptyLine)
|
130
|
-
{
|
131
|
-
// If at the end of record, read the next line and initialize the state
|
132
|
-
if (recordState != RecordState.END) {
|
133
|
-
throw new TooManyColumnsException("Too many columns");
|
134
|
-
}
|
135
|
-
|
136
|
-
boolean hasNext = nextLine(skipEmptyLine);
|
137
|
-
if (hasNext) {
|
138
|
-
recordState = RecordState.NOT_END;
|
139
|
-
return true;
|
140
|
-
} else {
|
141
|
-
return false;
|
142
|
-
}
|
143
|
-
}
|
144
|
-
|
145
|
-
private boolean nextLine(boolean skipEmptyLine)
|
146
|
-
{
|
147
|
-
while (true) {
|
148
|
-
if (!unreadLines.isEmpty()) {
|
149
|
-
line = unreadLines.removeFirst();
|
150
|
-
} else {
|
151
|
-
line = input.poll();
|
152
|
-
if (line == null) {
|
153
|
-
return false;
|
154
|
-
}
|
155
|
-
}
|
156
|
-
linePos = 0;
|
157
|
-
lineNumber++;
|
158
|
-
|
159
|
-
boolean skip = skipEmptyLine && (
|
160
|
-
line.isEmpty() ||
|
161
|
-
(commentLineMarker != null && line.startsWith(commentLineMarker)));
|
162
|
-
if (!skip) {
|
163
|
-
return true;
|
164
|
-
}
|
165
|
-
}
|
166
|
-
}
|
167
|
-
|
168
|
-
public boolean hasNextColumn()
|
169
|
-
{
|
170
|
-
return recordState == RecordState.NOT_END;
|
171
|
-
}
|
172
|
-
|
173
|
-
public String nextColumn()
|
174
|
-
{
|
175
|
-
if (!hasNextColumn()) {
|
176
|
-
throw new TooFewColumnsException("Too few columns");
|
177
|
-
}
|
178
|
-
|
179
|
-
// reset last state
|
180
|
-
wasQuotedColumn = false;
|
181
|
-
quotedValueLines.clear();
|
182
|
-
|
183
|
-
// local state
|
184
|
-
int valueStartPos = linePos;
|
185
|
-
int valueEndPos = 0; // initialized by VALUE state and used by LAST_TRIM_OR_VALUE and
|
186
|
-
StringBuilder quotedValue = null; // initial by VALUE or FIRST_TRIM state and used by QUOTED_VALUE state
|
187
|
-
ColumnState columnState = ColumnState.BEGIN;
|
188
|
-
|
189
|
-
while (true) {
|
190
|
-
final char c = nextChar();
|
191
|
-
|
192
|
-
switch (columnState) {
|
193
|
-
case BEGIN:
|
194
|
-
// TODO optimization: state is BEGIN only at the first character of a column.
|
195
|
-
// this block can be out of the looop.
|
196
|
-
if (isDelimiter(c)) {
|
197
|
-
// empty value
|
198
|
-
if (delimiterFollowingString == null) {
|
199
|
-
return "";
|
200
|
-
} else if (isDelimiterFollowingFrom(linePos)) {
|
201
|
-
linePos += delimiterFollowingString.length();
|
202
|
-
return "";
|
203
|
-
}
|
204
|
-
// not a delimiter
|
205
|
-
}
|
206
|
-
if (isEndOfLine(c)) {
|
207
|
-
// empty value
|
208
|
-
recordState = RecordState.END;
|
209
|
-
return "";
|
210
|
-
|
211
|
-
} else if (isSpace(c) && trimIfNotQuoted) {
|
212
|
-
columnState = ColumnState.FIRST_TRIM;
|
213
|
-
|
214
|
-
} else if (isQuote(c)) {
|
215
|
-
valueStartPos = linePos; // == 1
|
216
|
-
wasQuotedColumn = true;
|
217
|
-
quotedValue = new StringBuilder();
|
218
|
-
columnState = ColumnState.QUOTED_VALUE;
|
219
|
-
|
220
|
-
} else {
|
221
|
-
columnState = ColumnState.VALUE;
|
222
|
-
}
|
223
|
-
break;
|
224
|
-
|
225
|
-
case FIRST_TRIM:
|
226
|
-
if (isDelimiter(c)) {
|
227
|
-
// empty value
|
228
|
-
if (delimiterFollowingString == null) {
|
229
|
-
return "";
|
230
|
-
} else if (isDelimiterFollowingFrom(linePos)) {
|
231
|
-
linePos += delimiterFollowingString.length();
|
232
|
-
return "";
|
233
|
-
}
|
234
|
-
// not a delimiter
|
235
|
-
}
|
236
|
-
if (isEndOfLine(c)) {
|
237
|
-
// empty value
|
238
|
-
recordState = RecordState.END;
|
239
|
-
return "";
|
240
|
-
|
241
|
-
} else if (isQuote(c)) {
|
242
|
-
// column has heading spaces and quoted. TODO should this be rejected?
|
243
|
-
valueStartPos = linePos;
|
244
|
-
wasQuotedColumn = true;
|
245
|
-
quotedValue = new StringBuilder();
|
246
|
-
columnState = ColumnState.QUOTED_VALUE;
|
247
|
-
|
248
|
-
} else if (isSpace(c)) {
|
249
|
-
// skip this character
|
250
|
-
|
251
|
-
} else {
|
252
|
-
valueStartPos = linePos - 1;
|
253
|
-
columnState = ColumnState.VALUE;
|
254
|
-
}
|
255
|
-
break;
|
256
|
-
|
257
|
-
case VALUE:
|
258
|
-
if (isDelimiter(c)) {
|
259
|
-
if (delimiterFollowingString == null) {
|
260
|
-
return line.substring(valueStartPos, linePos - 1);
|
261
|
-
} else if (isDelimiterFollowingFrom(linePos)) {
|
262
|
-
String value = line.substring(valueStartPos, linePos - 1);
|
263
|
-
linePos += delimiterFollowingString.length();
|
264
|
-
return value;
|
265
|
-
}
|
266
|
-
// not a delimiter
|
267
|
-
}
|
268
|
-
if (isEndOfLine(c)) {
|
269
|
-
recordState = RecordState.END;
|
270
|
-
return line.substring(valueStartPos, linePos);
|
271
|
-
|
272
|
-
} else if (isSpace(c) && trimIfNotQuoted) {
|
273
|
-
valueEndPos = linePos - 1; // this is possibly end of value
|
274
|
-
columnState = ColumnState.LAST_TRIM_OR_VALUE;
|
275
|
-
|
276
|
-
// TODO not implemented yet foo""bar""baz -> [foo, bar, baz].append
|
277
|
-
//} else if (isQuote(c)) {
|
278
|
-
// // In RFC4180, If fields are not enclosed with double quotes, then
|
279
|
-
// // double quotes may not appear inside the fields. But they are often
|
280
|
-
// // included in the fields. We should care about them later.
|
281
|
-
|
282
|
-
} else {
|
283
|
-
// keep VALUE state
|
284
|
-
}
|
285
|
-
break;
|
286
|
-
|
287
|
-
case LAST_TRIM_OR_VALUE:
|
288
|
-
if (isDelimiter(c)) {
|
289
|
-
if (delimiterFollowingString == null) {
|
290
|
-
return line.substring(valueStartPos, valueEndPos);
|
291
|
-
} else if (isDelimiterFollowingFrom(linePos)) {
|
292
|
-
linePos += delimiterFollowingString.length();
|
293
|
-
return line.substring(valueStartPos, valueEndPos);
|
294
|
-
} else {
|
295
|
-
// not a delimiter
|
296
|
-
}
|
297
|
-
}
|
298
|
-
if (isEndOfLine(c)) {
|
299
|
-
recordState = RecordState.END;
|
300
|
-
return line.substring(valueStartPos, valueEndPos);
|
301
|
-
|
302
|
-
} else if (isSpace(c)) {
|
303
|
-
// keep LAST_TRIM_OR_VALUE state
|
304
|
-
|
305
|
-
} else {
|
306
|
-
// this spaces are not trailing spaces. go back to VALUE state
|
307
|
-
columnState = ColumnState.VALUE;
|
308
|
-
}
|
309
|
-
break;
|
310
|
-
|
311
|
-
case QUOTED_VALUE:
|
312
|
-
if (isEndOfLine(c)) {
|
313
|
-
// multi-line quoted value
|
314
|
-
quotedValue.append(line.substring(valueStartPos, linePos));
|
315
|
-
quotedValue.append(newline);
|
316
|
-
quotedValueLines.add(line);
|
317
|
-
if (!nextLine(false)) {
|
318
|
-
throw new InvalidValueException("Unexpected end of line during parsing a quoted value");
|
319
|
-
}
|
320
|
-
valueStartPos = 0;
|
321
|
-
|
322
|
-
} else if (isQuote(c)) {
|
323
|
-
char next = peekNextChar();
|
324
|
-
final char nextNext = peekNextNextChar();
|
325
|
-
if (isQuote(next) &&
|
326
|
-
(quotesInQuotedFields != QuotesInQuotedFields.ACCEPT_STRAY_QUOTES_ASSUMING_NO_DELIMITERS_IN_FIELDS ||
|
327
|
-
(!isDelimiter(nextNext) && !isEndOfLine(nextNext)))) {
|
328
|
-
// Escaped by preceding it with another quote.
|
329
|
-
// A quote just before a delimiter or an end of line is recognized as a functional quote,
|
330
|
-
// not just as a non-escaped stray "quote character" included the field, even if
|
331
|
-
// ACCEPT_STRAY_QUOTES_ASSUMING_NO_DELIMITERS_IN_FIELDS is specified.
|
332
|
-
quotedValue.append(line.substring(valueStartPos, linePos));
|
333
|
-
valueStartPos = ++linePos;
|
334
|
-
} else if (quotesInQuotedFields == QuotesInQuotedFields.ACCEPT_STRAY_QUOTES_ASSUMING_NO_DELIMITERS_IN_FIELDS &&
|
335
|
-
!(isDelimiter(next) || isEndOfLine(next))) {
|
336
|
-
// A non-escaped stray "quote character" in the field is processed as a regular character
|
337
|
-
// if ACCEPT_STRAY_QUOTES_ASSUMING_NO_DELIMITERS_IN_FIELDS is specified,
|
338
|
-
if ((linePos - valueStartPos) + quotedValue.length() > maxQuotedSizeLimit) {
|
339
|
-
throw new QuotedSizeLimitExceededException("The size of the quoted value exceeds the limit size (" + maxQuotedSizeLimit + ")");
|
340
|
-
}
|
341
|
-
} else {
|
342
|
-
quotedValue.append(line.substring(valueStartPos, linePos - 1));
|
343
|
-
columnState = ColumnState.AFTER_QUOTED_VALUE;
|
344
|
-
}
|
345
|
-
|
346
|
-
} else if (isEscape(c)) { // isQuote must be checked first in case of quote == escape
|
347
|
-
// In RFC 4180, CSV's escape char is '\"'. But '\\' is often used.
|
348
|
-
char next = peekNextChar();
|
349
|
-
if (isEndOfLine(c)) {
|
350
|
-
// escape end of line. TODO assuming multi-line quoted value without newline?
|
351
|
-
quotedValue.append(line.substring(valueStartPos, linePos));
|
352
|
-
quotedValueLines.add(line);
|
353
|
-
if (!nextLine(false)) {
|
354
|
-
throw new InvalidValueException("Unexpected end of line during parsing a quoted value");
|
355
|
-
}
|
356
|
-
valueStartPos = 0;
|
357
|
-
} else if (isQuote(next) || isEscape(next)) { // escaped quote
|
358
|
-
quotedValue.append(line.substring(valueStartPos, linePos - 1));
|
359
|
-
quotedValue.append(next);
|
360
|
-
valueStartPos = ++linePos;
|
361
|
-
}
|
362
|
-
|
363
|
-
} else {
|
364
|
-
if ((linePos - valueStartPos) + quotedValue.length() > maxQuotedSizeLimit) {
|
365
|
-
throw new QuotedSizeLimitExceededException("The size of the quoted value exceeds the limit size ("+maxQuotedSizeLimit+")");
|
366
|
-
}
|
367
|
-
// keep QUOTED_VALUE state
|
368
|
-
}
|
369
|
-
break;
|
370
|
-
|
371
|
-
case AFTER_QUOTED_VALUE:
|
372
|
-
if (isDelimiter(c)) {
|
373
|
-
if (delimiterFollowingString == null) {
|
374
|
-
return quotedValue.toString();
|
375
|
-
} else if (isDelimiterFollowingFrom(linePos)) {
|
376
|
-
linePos += delimiterFollowingString.length();
|
377
|
-
return quotedValue.toString();
|
378
|
-
}
|
379
|
-
// not a delimiter
|
380
|
-
}
|
381
|
-
if (isEndOfLine(c)) {
|
382
|
-
recordState = RecordState.END;
|
383
|
-
return quotedValue.toString();
|
384
|
-
|
385
|
-
} else if (isSpace(c)) {
|
386
|
-
// column has trailing spaces and quoted. TODO should this be rejected?
|
387
|
-
|
388
|
-
} else {
|
389
|
-
throw new InvalidValueException(String.format("Unexpected extra character '%c' after a value quoted by '%c'", c, quote));
|
390
|
-
}
|
391
|
-
break;
|
392
|
-
|
393
|
-
default:
|
394
|
-
assert false;
|
395
|
-
}
|
396
|
-
}
|
397
|
-
}
|
398
|
-
|
399
|
-
public String nextColumnOrNull()
|
400
|
-
{
|
401
|
-
String v = nextColumn();
|
402
|
-
if (nullStringOrNull == null) {
|
403
|
-
if (v.isEmpty()) {
|
404
|
-
if (wasQuotedColumn) {
|
405
|
-
return "";
|
406
|
-
}
|
407
|
-
else {
|
408
|
-
return null;
|
409
|
-
}
|
410
|
-
}
|
411
|
-
else {
|
412
|
-
return v;
|
413
|
-
}
|
414
|
-
}
|
415
|
-
else {
|
416
|
-
if (v.equals(nullStringOrNull)) {
|
417
|
-
return null;
|
418
|
-
}
|
419
|
-
else {
|
420
|
-
return v;
|
421
|
-
}
|
422
|
-
}
|
423
|
-
}
|
424
|
-
|
425
|
-
public boolean wasQuotedColumn()
|
426
|
-
{
|
427
|
-
return wasQuotedColumn;
|
428
|
-
}
|
429
|
-
|
430
|
-
private char nextChar()
|
431
|
-
{
|
432
|
-
Preconditions.checkState(line != null, "nextColumn is called after end of file");
|
433
|
-
|
434
|
-
if (linePos >= line.length()) {
|
435
|
-
return END_OF_LINE;
|
436
|
-
} else {
|
437
|
-
return line.charAt(linePos++);
|
438
|
-
}
|
439
|
-
}
|
440
|
-
|
441
|
-
private char peekNextChar()
|
442
|
-
{
|
443
|
-
Preconditions.checkState(line != null, "peekNextChar is called after end of file");
|
444
|
-
|
445
|
-
if (linePos >= line.length()) {
|
446
|
-
return END_OF_LINE;
|
447
|
-
} else {
|
448
|
-
return line.charAt(linePos);
|
449
|
-
}
|
450
|
-
}
|
451
|
-
|
452
|
-
private char peekNextNextChar()
|
453
|
-
{
|
454
|
-
Preconditions.checkState(line != null, "peekNextNextChar is called after end of file");
|
455
|
-
|
456
|
-
if (linePos + 1 >= line.length()) {
|
457
|
-
return END_OF_LINE;
|
458
|
-
} else {
|
459
|
-
return line.charAt(linePos + 1);
|
460
|
-
}
|
461
|
-
}
|
462
|
-
|
463
|
-
private boolean isSpace(char c)
|
464
|
-
{
|
465
|
-
return c == ' ';
|
466
|
-
}
|
467
|
-
|
468
|
-
private boolean isDelimiterFollowingFrom(int pos)
|
469
|
-
{
|
470
|
-
if (line.length() < pos + delimiterFollowingString.length()) {
|
471
|
-
return false;
|
472
|
-
}
|
473
|
-
for (int i = 0; i < delimiterFollowingString.length(); i++) {
|
474
|
-
if (delimiterFollowingString.charAt(i) != line.charAt(pos + i)) {
|
475
|
-
return false;
|
476
|
-
}
|
477
|
-
}
|
478
|
-
return true;
|
479
|
-
}
|
480
|
-
|
481
|
-
private boolean isDelimiter(char c)
|
482
|
-
{
|
483
|
-
return c == delimiterChar;
|
484
|
-
}
|
485
|
-
|
486
|
-
private boolean isEndOfLine(char c)
|
487
|
-
{
|
488
|
-
return c == END_OF_LINE;
|
489
|
-
}
|
490
|
-
|
491
|
-
private boolean isQuote(char c)
|
492
|
-
{
|
493
|
-
return quote != NO_QUOTE && c == quote;
|
494
|
-
}
|
495
|
-
|
496
|
-
private boolean isEscape(char c)
|
497
|
-
{
|
498
|
-
return escape != NO_ESCAPE && c == escape;
|
499
|
-
}
|
500
|
-
|
501
|
-
public static class InvalidFormatException
|
502
|
-
extends DataException
|
503
|
-
{
|
504
|
-
public InvalidFormatException(String message)
|
505
|
-
{
|
506
|
-
super(message);
|
507
|
-
}
|
508
|
-
}
|
509
|
-
|
510
|
-
public static class InvalidValueException
|
511
|
-
extends DataException
|
512
|
-
{
|
513
|
-
public InvalidValueException(String message)
|
514
|
-
{
|
515
|
-
super(message);
|
516
|
-
}
|
517
|
-
}
|
518
|
-
|
519
|
-
public static class QuotedSizeLimitExceededException
|
520
|
-
extends InvalidValueException
|
521
|
-
{
|
522
|
-
public QuotedSizeLimitExceededException(String message)
|
523
|
-
{
|
524
|
-
super(message);
|
525
|
-
}
|
526
|
-
}
|
527
|
-
|
528
|
-
public class TooManyColumnsException
|
529
|
-
extends InvalidFormatException
|
530
|
-
{
|
531
|
-
public TooManyColumnsException(String message)
|
532
|
-
{
|
533
|
-
super(message);
|
534
|
-
}
|
535
|
-
}
|
536
|
-
|
537
|
-
public class TooFewColumnsException
|
538
|
-
extends InvalidFormatException
|
539
|
-
{
|
540
|
-
public TooFewColumnsException(String message)
|
541
|
-
{
|
542
|
-
super(message);
|
543
|
-
}
|
544
|
-
}
|
545
|
-
}
|