Hi,
jira ????????????????
wlxie created KYLIN-3525:
----------------------------
Summary: kylin.source.hive.keep-flat-table????????
Key: KYLIN-3525
URL: https://issues.apache.org/jira/browse/KYLIN-3525
Project: Kylin
Issue Type: Improvement
Components: Streaming
Affects Versions: v2.4.0
Reporter: wlxie
Attachments: 1535534470(1).png, HiveMRInput.java
------------------ ???????? ------------------
??????: "ShaoFeng Shi"<[email protected]>;
????????: 2018??8??31??(??????) ????3:56
??????: "dev"<[email protected]>;
????: Re: ????kylin????kylin.source.hive.keep-flat-table????????
Hi,
This is a bug; In the before it can keep the data of the intermediate
table, that is helpful for troubleshooting. Could you please report a JIRA?
If you need to keep the intermediate table in one table, you can modify
Kylin code, but I suggest you to write some shell scripts to do that (just
moving the data to another location).
Thanks for the reporting!
?? 2018??8??31?? ????10:46?????????? <[email protected]>??????
> ????????????
> ??????????????kylin????????????????????????kylin.source.hive.keep-flat-
> table??????????????true??????????????hive??????????????????????????????????????????
> ??????????????????????????????????????????????????????????????????????????????????????
> ????????????????????????????????????cube??????????????????????????????????????????????????????????????????????????????????????????
> ??????????????????????????????????????
>
>
> ??????????
> private String cleanUpIntermediateFlatTable(KylinConfig config) throws
> IOException {
> StringBuffer output = new StringBuffer();
> final HiveCmdBuilder hiveCmdBuilder = new HiveCmdBuilder();
> final List<String> hiveTables = this.getIntermediateTables();
> for (String hiveTable : hiveTables) {
> if (config.isHiveKeepFlatTable() == false &&
> StringUtils.isNotEmpty(hiveTable)) {
> hiveCmdBuilder.addStatement("USE " + config.
> getHiveDatabaseForIntermediateTable() + ";");
> hiveCmdBuilder.addStatement("DROP TABLE IF EXISTS "
> + hiveTable + ";");
>
>
> output.append("Hive table " + hiveTable + " is
> dropped. \n");
> }
> }
> config.getCliCommandExecutor().execute(hiveCmdBuilder.build(
> ));
> rmdirOnHDFS(getExternalDataPaths());
> output.append("Path " + getExternalDataPaths() + " is deleted.
> \n");
>
>
> return output.toString();
> }
--
Best regards,
Shaofeng Shi ??????