[HOTFIX] Improve log message in CarbonWriterBuilder In master the log message is not proper: AppName is not set, please use writtenBy() API to set the App Namewhich is using SDK
This closes #2920 Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/d4bd4ab6 Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/d4bd4ab6 Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/d4bd4ab6 Branch: refs/heads/branch-1.5 Commit: d4bd4ab61521fce160f8980839a2ee2a9f2164c6 Parents: 2f7b003 Author: Jacky Li <jacky.li...@huawei.com> Authored: Wed Nov 14 20:54:33 2018 +0800 Committer: ravipesala <ravi.pes...@gmail.com> Committed: Wed Nov 21 22:43:46 2018 +0530 ---------------------------------------------------------------------- .../org/apache/carbondata/sdk/file/CarbonWriterBuilder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/carbondata/blob/d4bd4ab6/store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java ---------------------------------------------------------------------- diff --git a/store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java b/store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java index 917d4dc..1ca5b74 100644 --- a/store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java +++ b/store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java @@ -438,13 +438,13 @@ public class CarbonWriterBuilder { Objects.requireNonNull(path, "path should not be null"); if (this.writerType == null) { throw new IOException( - "Writer type is not set, use withCsvInput() or withAvroInput() or withJsonInput() " + "'writerType' must be set, use withCsvInput() or withAvroInput() or withJsonInput() " + "API based on input"); } if (this.writtenByApp == null || this.writtenByApp.isEmpty()) { throw new RuntimeException( - "AppName is not set, please use writtenBy() API to set the App Name" - + "which is using SDK"); + "'writtenBy' must be set when writing carbon files, use writtenBy() API to " + + "set it, it can be the name of the application which is using the SDK"); } CarbonLoadModel loadModel = buildLoadModel(schema); loadModel.setSdkWriterCores(numOfThreads);