shaofengshi closed pull request #203: KYLIN-3500 fix duplicated tablename at 
createSqoopToFlatHiveStep  wh…
URL: https://github.com/apache/kylin/pull/203
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/source-hive/src/main/java/org/apache/kylin/source/jdbc/JdbcHiveMRInput.java 
b/source-hive/src/main/java/org/apache/kylin/source/jdbc/JdbcHiveMRInput.java
index 74d95cf0ee..b8bc56faaf 100644
--- 
a/source-hive/src/main/java/org/apache/kylin/source/jdbc/JdbcHiveMRInput.java
+++ 
b/source-hive/src/main/java/org/apache/kylin/source/jdbc/JdbcHiveMRInput.java
@@ -184,15 +184,11 @@ private AbstractExecutable 
createSqoopToFlatHiveStep(String jobWorkingDir, Strin
                 }
             }
 
-            //related to 
"kylin.engine.mr.config-override.mapreduce.job.queuename"
-            String queueName = getSqoopJobQueueName(config);
-            String cmd = String.format("%s/sqoop import 
-Dorg.apache.sqoop.splitter.allow_text_splitter=true "
-                    + generateSqoopConfigArgString()
+            String cmd = String.format("%s/sqoop import" + 
generateSqoopConfigArgString()
                     + "--connect \"%s\" --driver %s --username %s --password 
%s --query \"%s AND \\$CONDITIONS\" "
-                    + "--target-dir %s/%s --split-by %s.%s --boundary-query 
\"%s\" --null-string '' "
+                    + "--target-dir %s/%s --split-by %s --boundary-query 
\"%s\" --null-string '' "
                     + "--fields-terminated-by '%s' --num-mappers %d", 
sqoopHome, connectionUrl, driverClass, jdbcUser,
-                    jdbcPass, selectSql, jobWorkingDir, hiveTable, splitTable, 
splitColumn, bquery, filedDelimiter,
-                    mapperNum);
+                    jdbcPass, selectSql, jobWorkingDir, hiveTable, 
splitColumn, bquery, filedDelimiter, mapperNum);
             logger.debug(String.format("sqoop cmd:%s", cmd));
             CmdStep step = new CmdStep();
             step.setCmd(cmd);
@@ -212,7 +208,7 @@ protected String generateSqoopConfigArgString() {
             config.putAll(SourceConfigurationUtil.loadSqoopConfiguration());
             config.putAll(kylinConfig.getSqoopConfigOverride());
 
-            StringBuilder args = new StringBuilder();
+            StringBuilder args = new StringBuilder(" 
-Dorg.apache.sqoop.splitter.allow_text_splitter=true ");
             for (Map.Entry<String, String> entry : config.entrySet()) {
                 args.append(" -D" + entry.getKey() + "=" + entry.getValue() + 
" ");
             }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to