You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by GitBox <gi...@apache.org> on 2020/12/02 06:04:20 UTC
[GitHub] [kylin] fengpod opened a new pull request #1494: create hfile on hadoop hdfs and distcp to hbase hdfs
fengpod opened a new pull request #1494:
URL: https://github.com/apache/kylin/pull/1494
## Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
## Types of changes
What types of changes does your code introduce to Kylin?
_Put an `x` in the boxes that apply_
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation Update (if none of the other choices apply)
## Checklist
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
- [ ] I have create an issue on [Kylin's jira](https://issues.apache.org/jira/browse/KYLIN), and have described the bug/feature there in detail
- [ ] Commit messages in my PR start with the related jira ID, like "KYLIN-0000 Make Kylin project open-source"
- [ ] Compiling and unit tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] If this change need a document change, I will prepare another pr against the `document` branch
- [ ] Any dependent changes have been merged
## Further comments
If this is a relatively large or complex change, kick off the discussion at user@kylin or dev@kylin by explaining why you chose the solution you did and what alternatives you considered, etc...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kylin] fengpod commented on pull request #1494: create hfile on hadoop hdfs and distcp to hbase hdfs
Posted by GitBox <gi...@apache.org>.
fengpod commented on pull request #1494:
URL: https://github.com/apache/kylin/pull/1494#issuecomment-737018145
When a large data is written to hbase cluster at the same time,the cluster load will become very high,which will affect the query performance. This pr allows data to be written data to hadoop hdfs when doing step “Convert Cuboid Data to HFile”,and then hfile will be transferred to the hbase cluster by dist-cp。This pr adds a new step " HFile Distcp To HBase" between “Convert Cuboid Data to HFile” and "Load HFile to HBase Table" 。As look like this:

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kylin] hit-lacus commented on pull request #1494: KYLIN-4833 create hfile on hadoop hdfs and distcp to hbase hdfs
Posted by GitBox <gi...@apache.org>.
hit-lacus commented on pull request #1494:
URL: https://github.com/apache/kylin/pull/1494#issuecomment-745103383
This is a good idea. @guangxuCheng , would you like to have a look ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kylin] codecov-io commented on pull request #1494: KYLIN-4833 create hfile on hadoop hdfs and distcp to hbase hdfs
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1494:
URL: https://github.com/apache/kylin/pull/1494#issuecomment-752317548
# [Codecov](https://codecov.io/gh/apache/kylin/pull/1494?src=pr&el=h1) Report
> Merging [#1494](https://codecov.io/gh/apache/kylin/pull/1494?src=pr&el=desc) (d37b1e7) into [master](https://codecov.io/gh/apache/kylin/commit/3e12b6d621fe8e5c747a5783f64bc535618c8035?el=desc) (3e12b6d) will **decrease** coverage by `0.08%`.
> The diff coverage is `0.00%`.
[](https://codecov.io/gh/apache/kylin/pull/1494?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1494 +/- ##
============================================
- Coverage 25.51% 25.43% -0.09%
+ Complexity 6765 6764 -1
============================================
Files 1505 1508 +3
Lines 93618 93871 +253
Branches 13111 13144 +33
============================================
- Hits 23886 23873 -13
- Misses 67356 67617 +261
- Partials 2376 2381 +5
```
| [Impacted Files](https://codecov.io/gh/apache/kylin/pull/1494?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [.../java/org/apache/kylin/common/KylinConfigBase.java](https://codecov.io/gh/apache/kylin/pull/1494/diff?src=pr&el=tree#diff-Y29yZS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL2NvbW1vbi9LeWxpbkNvbmZpZ0Jhc2UuamF2YQ==) | `12.46% <0.00%> (-0.10%)` | `51.00 <0.00> (ø)` | |
| [...torage/hbase/steps/HBaseFlinkOutputTransition.java](https://codecov.io/gh/apache/kylin/pull/1494/diff?src=pr&el=tree#diff-c3RvcmFnZS1oYmFzZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vc3RvcmFnZS9oYmFzZS9zdGVwcy9IQmFzZUZsaW5rT3V0cHV0VHJhbnNpdGlvbi5qYXZh) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...che/kylin/storage/hbase/steps/HBaseFlinkSteps.java](https://codecov.io/gh/apache/kylin/pull/1494/diff?src=pr&el=tree#diff-c3RvcmFnZS1oYmFzZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vc3RvcmFnZS9oYmFzZS9zdGVwcy9IQmFzZUZsaW5rU3RlcHMuamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...pache/kylin/storage/hbase/steps/HBaseJobSteps.java](https://codecov.io/gh/apache/kylin/pull/1494/diff?src=pr&el=tree#diff-c3RvcmFnZS1oYmFzZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vc3RvcmFnZS9oYmFzZS9zdGVwcy9IQmFzZUpvYlN0ZXBzLmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [.../storage/hbase/steps/HBaseMROutput2Transition.java](https://codecov.io/gh/apache/kylin/pull/1494/diff?src=pr&el=tree#diff-c3RvcmFnZS1oYmFzZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vc3RvcmFnZS9oYmFzZS9zdGVwcy9IQmFzZU1ST3V0cHV0MlRyYW5zaXRpb24uamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...apache/kylin/storage/hbase/steps/HBaseMRSteps.java](https://codecov.io/gh/apache/kylin/pull/1494/diff?src=pr&el=tree#diff-c3RvcmFnZS1oYmFzZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vc3RvcmFnZS9oYmFzZS9zdGVwcy9IQmFzZU1SU3RlcHMuamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...torage/hbase/steps/HBaseSparkOutputTransition.java](https://codecov.io/gh/apache/kylin/pull/1494/diff?src=pr&el=tree#diff-c3RvcmFnZS1oYmFzZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vc3RvcmFnZS9oYmFzZS9zdGVwcy9IQmFzZVNwYXJrT3V0cHV0VHJhbnNpdGlvbi5qYXZh) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...age/hbase/steps/HDFSPathGarbageCollectionStep.java](https://codecov.io/gh/apache/kylin/pull/1494/diff?src=pr&el=tree#diff-c3RvcmFnZS1oYmFzZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vc3RvcmFnZS9oYmFzZS9zdGVwcy9IREZTUGF0aEdhcmJhZ2VDb2xsZWN0aW9uU3RlcC5qYXZh) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...ache/kylin/storage/hbase/steps/HFileDistcpJob.java](https://codecov.io/gh/apache/kylin/pull/1494/diff?src=pr&el=tree#diff-c3RvcmFnZS1oYmFzZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vc3RvcmFnZS9oYmFzZS9zdGVwcy9IRmlsZURpc3RjcEpvYi5qYXZh) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
| [.../apache/kylin/tool/query/ProbabilityGenerator.java](https://codecov.io/gh/apache/kylin/pull/1494/diff?src=pr&el=tree#diff-dG9vbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vdG9vbC9xdWVyeS9Qcm9iYWJpbGl0eUdlbmVyYXRvci5qYXZh) | `71.05% <0.00%> (-5.27%)` | `11.00% <0.00%> (ø%)` | |
| ... and [12 more](https://codecov.io/gh/apache/kylin/pull/1494/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/kylin/pull/1494?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/kylin/pull/1494?src=pr&el=footer). Last update [3e12b6d...d37b1e7](https://codecov.io/gh/apache/kylin/pull/1494?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kylin] hit-lacus merged pull request #1494: KYLIN-4833 create hfile on hadoop hdfs and distcp to hbase hdfs
Posted by GitBox <gi...@apache.org>.
hit-lacus merged pull request #1494:
URL: https://github.com/apache/kylin/pull/1494
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kylin] fengpod edited a comment on pull request #1494: create hfile on hadoop hdfs and distcp to hbase hdfs
Posted by GitBox <gi...@apache.org>.
fengpod edited a comment on pull request #1494:
URL: https://github.com/apache/kylin/pull/1494#issuecomment-737018145
When a large data is written to hbase cluster at the same time,the cluster load will become very high,which will affect the query performance. This pr allows data to be written data to hadoop hdfs when doing step “Convert Cuboid Data to HFile”,and then hfile will be transferred to the hbase cluster by DistCp。DistCp controls the speed of write data so as to reduce the pressure of cluster。 This pr adds a new step " HFile Distcp To HBase" between “Convert Cuboid Data to HFile” and "Load HFile to HBase Table" 。As look like this:

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kylin] coveralls commented on pull request #1494: KYLIN-4833 create hfile on hadoop hdfs and distcp to hbase hdfs
Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #1494:
URL: https://github.com/apache/kylin/pull/1494#issuecomment-737026735
## Pull Request Test Coverage Report for [Build 6598](https://coveralls.io/builds/35381222)
* **0** of **94** **(0.0%)** changed or added relevant lines in **9** files are covered.
* **11** unchanged lines in **5** files lost coverage.
* Overall coverage decreased (**-0.02%**) to **28.015%**
---
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
| :-----|--------------|--------|---: |
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HDFSPathGarbageCollectionStep.java](https://coveralls.io/builds/35381222/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHDFSPathGarbageCollectionStep.java#L94) | 0 | 2 | 0.0%
| [core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java](https://coveralls.io/builds/35381222/source?filename=core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcommon%2FKylinConfigBase.java#L2692) | 0 | 3 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseFlinkOutputTransition.java](https://coveralls.io/builds/35381222/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHBaseFlinkOutputTransition.java#L58) | 0 | 4 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseSparkOutputTransition.java](https://coveralls.io/builds/35381222/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHBaseSparkOutputTransition.java#L58) | 0 | 4 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseMROutput2Transition.java](https://coveralls.io/builds/35381222/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHBaseMROutput2Transition.java#L81) | 0 | 6 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseFlinkSteps.java](https://coveralls.io/builds/35381222/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHBaseFlinkSteps.java#L50) | 0 | 8 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseMRSteps.java](https://coveralls.io/builds/35381222/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHBaseMRSteps.java#L43) | 0 | 8 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseJobSteps.java](https://coveralls.io/builds/35381222/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHBaseJobSteps.java#L67) | 0 | 20 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HFileDistcpJob.java](https://coveralls.io/builds/35381222/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHFileDistcpJob.java#L45) | 0 | 39 | 0.0%
<!-- | **Total:** | **0** | **94** | **0.0%** | -->
| Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java](https://coveralls.io/builds/35381222/source?filename=core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcommon%2FKylinConfigBase.java#L2704) | 1 | 13.57% |
| [tool/src/main/java/org/apache/kylin/tool/query/ProbabilityGenerator.java](https://coveralls.io/builds/35381222/source?filename=tool%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Ftool%2Fquery%2FProbabilityGenerator.java#L44) | 1 | 81.58% |
| [core-cube/src/main/java/org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java](https://coveralls.io/builds/35381222/source?filename=core-cube%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcube%2Fcuboid%2FTreeCuboidScheduler.java#L124) | 2 | 68.46% |
| [stream-core/src/main/java/org/apache/kylin/stream/core/storage/CheckPointStore.java](https://coveralls.io/builds/35381222/source?filename=stream-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstream%2Fcore%2Fstorage%2FCheckPointStore.java#L98) | 2 | 73.74% |
| [core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java](https://coveralls.io/builds/35381222/source?filename=core-cube%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcube%2Finmemcubing%2FMemDiskStore.java#L439) | 5 | 77.81% |
<!-- | **Total:** | **11** | | -->
| Totals | [](https://coveralls.io/builds/35381222) |
| :-- | --: |
| Change from base [Build 6595](https://coveralls.io/builds/35328877): | -0.02% |
| Covered Lines: | 26253 |
| Relevant Lines: | 93709 |
---
##### 💛 - [Coveralls](https://coveralls.io)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kylin] hit-lacus commented on a change in pull request #1494: KYLIN-4833 create hfile on hadoop hdfs and distcp to hbase hdfs
Posted by GitBox <gi...@apache.org>.
hit-lacus commented on a change in pull request #1494:
URL: https://github.com/apache/kylin/pull/1494#discussion_r549549351
##########
File path: storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseJobSteps.java
##########
@@ -63,6 +64,13 @@ public HadoopShellExecutable createCreateHTableStep(String jobId, CuboidModeEnum
appendExecCmdParameters(cmd, BatchConstants.ARG_SEGMENT_ID, seg.getUuid());
appendExecCmdParameters(cmd, BatchConstants.ARG_PARTITION,
getRowkeyDistributionOutputPath(jobId) + "/part-r-00000");
+ if(this.seg.getConfig().isHFileDistCP()){
+ String partitionOutputPath = getRealizationRootPath(jobId) + "/rowkey_stats/part-r-00000_hfile";
+ appendExecCmdParameters(cmd, BatchConstants.ARG_PARTITION, partitionOutputPath);
+ }else {
+ appendExecCmdParameters(cmd, BatchConstants.ARG_PARTITION,
Review comment:
Append paramters twice for `BatchConstants.ARG_PARTITION` .
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kylin] nyshthefantastic commented on a change in pull request #1494: KYLIN-4833 create hfile on hadoop hdfs and distcp to hbase hdfs
Posted by GitBox <gi...@apache.org>.
nyshthefantastic commented on a change in pull request #1494:
URL: https://github.com/apache/kylin/pull/1494#discussion_r548532199
##########
File path: storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseJobSteps.java
##########
@@ -72,6 +80,26 @@ public HadoopShellExecutable createCreateHTableStep(String jobId, CuboidModeEnum
return createHtableStep;
}
+ public AbstractExecutable createDistcpHFileStep(String jobId){
+ String inputPath = getRealizationRootPath(jobId) + "/hfile";
+ MapReduceExecutable createHFilesStep = new MapReduceExecutable();
+ createHFilesStep.setName(ExecutableConstants.STEP_NAME_HFILE_DISTCP);
+ StringBuilder cmd = new StringBuilder();
+
+ appendMapReduceParameters(cmd);
+ appendExecCmdParameters(cmd, BatchConstants.ARG_CUBE_NAME, seg.getRealization().getName());
+// appendExecCmdParameters(cmd, BatchConstants.ARG_PARTITION, getRowkeyDistributionOutputPath(jobId) + "/part-r-00000_hfile");
Review comment:
remove commented code if not needed , will help in code readability going forward.
##########
File path: storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HDFSPathGarbageCollectionStep.java
##########
@@ -91,7 +91,8 @@ private void dropHdfsPathOnCluster(List<String> oldHdfsPaths, FileSystem fileSys
}
// If hbase was deployed on another cluster, the job dir is empty and should be dropped,
// because of rowkey_stats and hfile dirs are both dropped.
- if (fileSystem.listStatus(oldPath.getParent()).length == 0) {
+ Path parentPath = oldPath.getParent();
Review comment:
good to use final if variable is not mutated : final Path parentPath
##########
File path: storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HFileDistcpJob.java
##########
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kylin.storage.hbase.steps;
+
+import com.google.common.collect.Lists;
+import org.apache.commons.cli.Options;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.mapred.JobContext;
+import org.apache.hadoop.tools.DistCp;
+import org.apache.hadoop.tools.DistCpOptions;
+import org.apache.hadoop.util.ToolRunner;
+import org.apache.kylin.common.KylinConfig;
+import org.apache.kylin.common.util.HadoopUtil;
+import org.apache.kylin.cube.CubeInstance;
+import org.apache.kylin.cube.CubeManager;
+import org.apache.kylin.engine.mr.common.AbstractHadoopJob;
+import org.apache.kylin.engine.mr.common.BatchConstants;
+import org.apache.kylin.storage.hbase.HBaseConnection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+
+/**
+ * @author fengpod
+ */
+public class HFileDistcpJob extends AbstractHadoopJob {
+
+ protected static final Logger logger = LoggerFactory.getLogger(HFileDistcpJob.class);
+
+ public int run(String[] args) throws Exception {
+ Options options = new Options();
+
+ try {
+ options.addOption(OPTION_CUBE_NAME);
+ options.addOption(OPTION_JOB_NAME);
+ options.addOption(OPTION_INPUT_PATH);
+ options.addOption(OPTION_OUTPUT_PATH);
+ options.addOption(OPTION_HTABLE_NAME);
+ parseOptions(options, args);
+
+ // use current hbase configuration
+ Configuration configuration = new Configuration();
+ HBaseConnection.addHBaseClusterNNHAConfiguration(configuration);
+
+ Path input = new Path(getOptionValue(OPTION_INPUT_PATH));
Review comment:
good to change to final
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kylin] coveralls edited a comment on pull request #1494: KYLIN-4833 create hfile on hadoop hdfs and distcp to hbase hdfs
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #1494:
URL: https://github.com/apache/kylin/pull/1494#issuecomment-737026735
## Pull Request Test Coverage Report for [Build 6684](https://coveralls.io/builds/35998204)
* **0** of **93** **(0.0%)** changed or added relevant lines in **9** files are covered.
* **299** unchanged lines in **5** files lost coverage.
* Overall coverage decreased (**-0.06%**) to **27.972%**
---
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
| :-----|--------------|--------|---: |
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HDFSPathGarbageCollectionStep.java](https://coveralls.io/builds/35998204/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHDFSPathGarbageCollectionStep.java#L94) | 0 | 2 | 0.0%
| [core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java](https://coveralls.io/builds/35998204/source?filename=core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcommon%2FKylinConfigBase.java#L2692) | 0 | 3 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseFlinkOutputTransition.java](https://coveralls.io/builds/35998204/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHBaseFlinkOutputTransition.java#L58) | 0 | 4 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseSparkOutputTransition.java](https://coveralls.io/builds/35998204/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHBaseSparkOutputTransition.java#L58) | 0 | 4 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseMROutput2Transition.java](https://coveralls.io/builds/35998204/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHBaseMROutput2Transition.java#L81) | 0 | 6 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseFlinkSteps.java](https://coveralls.io/builds/35998204/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHBaseFlinkSteps.java#L50) | 0 | 8 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseMRSteps.java](https://coveralls.io/builds/35998204/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHBaseMRSteps.java#L43) | 0 | 8 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseJobSteps.java](https://coveralls.io/builds/35998204/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHBaseJobSteps.java#L67) | 0 | 19 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HFileDistcpJob.java](https://coveralls.io/builds/35998204/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHFileDistcpJob.java#L45) | 0 | 39 | 0.0%
<!-- | **Total:** | **0** | **93** | **0.0%** | -->
| Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java](https://coveralls.io/builds/35998204/source?filename=core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcommon%2FKylinConfigBase.java#L2704) | 1 | 13.57% |
| [core-cube/src/main/java/org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java](https://coveralls.io/builds/35998204/source?filename=core-cube%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcube%2Fcuboid%2FTreeCuboidScheduler.java#L124) | 2 | 68.46% |
| [engine-spark/src/main/java/org/apache/kylin/engine/spark/SparkCubingByLayer.java](https://coveralls.io/builds/35998204/source?filename=engine-spark%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fengine%2Fspark%2FSparkCubingByLayer.java#L203) | 56 | 0% |
| [core-common/src/main/java/org/apache/kylin/common/KylinConfig.java](https://coveralls.io/builds/35998204/source?filename=core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcommon%2FKylinConfig.java#L153) | 91 | 42.66% |
| [tool/src/main/java/org/apache/kylin/tool/CubeMigrationCLI.java](https://coveralls.io/builds/35998204/source?filename=tool%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Ftool%2FCubeMigrationCLI.java#L85) | 149 | 0% |
<!-- | **Total:** | **299** | | -->
| Totals | [](https://coveralls.io/builds/35998204) |
| :-- | --: |
| Change from base [Build 6595](https://coveralls.io/builds/35328877): | -0.06% |
| Covered Lines: | 26258 |
| Relevant Lines: | 93871 |
---
##### 💛 - [Coveralls](https://coveralls.io)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kylin] fengpod commented on a change in pull request #1494: KYLIN-4833 create hfile on hadoop hdfs and distcp to hbase hdfs
Posted by GitBox <gi...@apache.org>.
fengpod commented on a change in pull request #1494:
URL: https://github.com/apache/kylin/pull/1494#discussion_r549922369
##########
File path: storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseJobSteps.java
##########
@@ -63,6 +64,13 @@ public HadoopShellExecutable createCreateHTableStep(String jobId, CuboidModeEnum
appendExecCmdParameters(cmd, BatchConstants.ARG_SEGMENT_ID, seg.getUuid());
appendExecCmdParameters(cmd, BatchConstants.ARG_PARTITION,
getRowkeyDistributionOutputPath(jobId) + "/part-r-00000");
+ if(this.seg.getConfig().isHFileDistCP()){
+ String partitionOutputPath = getRealizationRootPath(jobId) + "/rowkey_stats/part-r-00000_hfile";
+ appendExecCmdParameters(cmd, BatchConstants.ARG_PARTITION, partitionOutputPath);
+ }else {
+ appendExecCmdParameters(cmd, BatchConstants.ARG_PARTITION,
Review comment:
new commit fixed this
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org