[ https://issues.apache.org/jira/browse/KYLIN-3543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16619964#comment-16619964 ]
ASF GitHub Bot commented on KYLIN-3543: --------------------------------------- shaofengshi closed pull request #237: KYLIN-3543 Export HBase configuration only for Spark engine URL: https://github.com/apache/kylin/pull/237 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/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java index 93c12960de..7205802388 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java @@ -53,6 +53,7 @@ import org.apache.kylin.engine.mr.common.CubeStatsReader; import org.apache.kylin.engine.mr.common.CuboidShardUtil; import org.apache.kylin.job.exception.ExecuteException; +import org.apache.kylin.metadata.model.IEngineAware; import org.apache.kylin.storage.hbase.HBaseConnection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -119,7 +120,11 @@ public int run(String[] args) throws Exception { partitionFilePath.getParent()); CubeHTableUtil.createHTable(cubeSegment, splitKeys); - exportHBaseConfiguration(cubeSegment.getStorageLocationIdentifier()); + + // export configuration in advance to avoid connecting to hbase from spark + if (cubeDesc.getEngineType()== IEngineAware.ID_SPARK){ + exportHBaseConfiguration(cubeSegment.getStorageLocationIdentifier()); + } return 0; } ---------------------------------------------------------------- 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: us...@infra.apache.org > Unclosed Job instance in CreateHTableJob#exportHBaseConfiguration > ----------------------------------------------------------------- > > Key: KYLIN-3543 > URL: https://issues.apache.org/jira/browse/KYLIN-3543 > Project: Kylin > Issue Type: Bug > Reporter: Ted Yu > Priority: Minor > > {code} > out = fs.create(new Path(hbaseConfPath)); > job.getConfiguration().writeXml(out); > {code} > The job instance should be closed upon return from the method. -- This message was sent by Atlassian JIRA (v7.6.3#76005)