GitHub user xuchuanyin opened a pull request:
https://github.com/apache/carbondata/pull/2272 [CARBONDATA-2441][Datamap] Implement distribute interface for bloom datamap implement distribute interface for bloom datamap Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [ ] Any interfaces changed? `No` - [ ] Any backward compatibility impacted? `No` - [ ] Document update required? `No` - [ ] Testing done Please provide details on - Whether new unit test cases have been added or why no new tests are required? `Tests added` - How it is tested? Please attach test report. - Is it a performance related change? Please attach the performance test report. - Any additional information to help reviewers in testing this change. - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. You can merge this pull request into a Git repository by running: $ git pull https://github.com/xuchuanyin/carbondata 0505_distribute_bloom_dm Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/2272.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2272 ---- commit acdf589d468df8ba2e826c8fcfb1f57436ed9f64 Author: xuchuanyin <xuchuanyin@...> Date: 2018-05-05T05:51:34Z Implement distribute interface for bloom datamap implement distribute interface for bloom datamap ---- --- |
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2272 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/5658/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2272 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/4498/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2272 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/4735/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2272 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/5690/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2272 Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/4530/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2272 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/5703/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2272 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/4543/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2272 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/4768/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2272 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/4781/ --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2272#discussion_r186692664 --- Diff: datamap/bloom/src/main/java/org/apache/carbondata/datamap/bloom/BloomDataMapDistributable.java --- @@ -0,0 +1,47 @@ +/* + * 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.carbondata.datamap.bloom; + +import org.apache.carbondata.common.annotations.InterfaceAudience; +import org.apache.carbondata.core.datamap.DataMapDistributable; + +@InterfaceAudience.Internal +class BloomDataMapDistributable extends DataMapDistributable { + + // TODO: seems no one use this? + private String dataPath; --- End diff -- Remove it if no one use it --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2272#discussion_r186692770 --- Diff: datamap/bloom/src/main/java/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMapFactory.java --- @@ -154,12 +158,68 @@ public DataMapRefresher createRefresher(Segment segment, String shardName) throw @Override public List<CoarseGrainDataMap> getDataMaps(DataMapDistributable distributable) throws IOException { - return null; + List<CoarseGrainDataMap> coarseGrainDataMaps = new ArrayList<>(); + BloomCoarseGrainDataMap bloomCoarseGrainDataMap = new BloomCoarseGrainDataMap(); + String indexPath = ((BloomDataMapDistributable) distributable).getIndexPath(); + try { + bloomCoarseGrainDataMap.init(new DataMapModel(indexPath)); + } catch (IOException e) { + LOGGER.error(e, "Failed to get bloom datamap"); + return coarseGrainDataMaps; + } + coarseGrainDataMaps.add(bloomCoarseGrainDataMap); + return coarseGrainDataMaps; + } + + /** + * returns all the directories of lucene index files for query + * Note: copied from luceneDataMapFactory, will extract to a common interface + */ + private CarbonFile[] getAllIndexDirs(String tablePath, String segmentId) { + List<CarbonFile> indexDirs = new ArrayList<>(); + List<TableDataMap> dataMaps = new ArrayList<>(); + try { + // there can be multiple bloom datamaps present on a table, so get all datamaps and form + // the path till the index file directories in all datamaps folders present in each segment + dataMaps = DataMapStoreManager.getInstance().getAllDataMap(getCarbonTable()); + } catch (IOException ex) { + LOGGER.error("failed to get datamaps"); --- End diff -- should throw ex --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2272#discussion_r186692843 --- Diff: datamap/bloom/src/main/java/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMapFactory.java --- @@ -154,12 +158,68 @@ public DataMapRefresher createRefresher(Segment segment, String shardName) throw @Override public List<CoarseGrainDataMap> getDataMaps(DataMapDistributable distributable) throws IOException { - return null; + List<CoarseGrainDataMap> coarseGrainDataMaps = new ArrayList<>(); + BloomCoarseGrainDataMap bloomCoarseGrainDataMap = new BloomCoarseGrainDataMap(); + String indexPath = ((BloomDataMapDistributable) distributable).getIndexPath(); + try { + bloomCoarseGrainDataMap.init(new DataMapModel(indexPath)); + } catch (IOException e) { + LOGGER.error(e, "Failed to get bloom datamap"); + return coarseGrainDataMaps; --- End diff -- why not throw e? --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2272#discussion_r186720163 --- Diff: datamap/bloom/src/main/java/org/apache/carbondata/datamap/bloom/BloomDataMapDistributable.java --- @@ -0,0 +1,34 @@ +/* + * 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.carbondata.datamap.bloom; + +import org.apache.carbondata.common.annotations.InterfaceAudience; +import org.apache.carbondata.core.datamap.DataMapDistributable; + +@InterfaceAudience.Internal +class BloomDataMapDistributable extends DataMapDistributable { + private String indexPath; + + BloomDataMapDistributable(String dataPath, String indexPath) { --- End diff -- dataPath is not used --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2272#discussion_r186720259 --- Diff: datamap/bloom/src/main/java/org/apache/carbondata/datamap/bloom/BloomDataMapDistributable.java --- @@ -0,0 +1,34 @@ +/* + * 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.carbondata.datamap.bloom; + +import org.apache.carbondata.common.annotations.InterfaceAudience; +import org.apache.carbondata.core.datamap.DataMapDistributable; + +@InterfaceAudience.Internal +class BloomDataMapDistributable extends DataMapDistributable { + private String indexPath; + + BloomDataMapDistributable(String dataPath, String indexPath) { --- End diff -- And can you describe what should be the indexPath? file path or folder path? --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2272#discussion_r186720877 --- Diff: datamap/bloom/src/main/java/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMapFactory.java --- @@ -154,12 +158,65 @@ public DataMapRefresher createRefresher(Segment segment, String shardName) throw @Override public List<CoarseGrainDataMap> getDataMaps(DataMapDistributable distributable) throws IOException { - return null; + List<CoarseGrainDataMap> coarseGrainDataMaps = new ArrayList<>(); + BloomCoarseGrainDataMap bloomCoarseGrainDataMap = new BloomCoarseGrainDataMap(); + String indexPath = ((BloomDataMapDistributable) distributable).getIndexPath(); + bloomCoarseGrainDataMap.init(new DataMapModel(indexPath)); + coarseGrainDataMaps.add(bloomCoarseGrainDataMap); + return coarseGrainDataMaps; + } + + /** + * returns all the directories of lucene index files for query + * Note: copied from luceneDataMapFactory, will extract to a common interface --- End diff -- Add a TODO --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2272 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/5736/ --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2272#discussion_r186751614 --- Diff: datamap/bloom/src/main/java/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMapFactory.java --- @@ -154,12 +158,65 @@ public DataMapRefresher createRefresher(Segment segment, String shardName) throw @Override public List<CoarseGrainDataMap> getDataMaps(DataMapDistributable distributable) throws IOException { - return null; + List<CoarseGrainDataMap> coarseGrainDataMaps = new ArrayList<>(); + BloomCoarseGrainDataMap bloomCoarseGrainDataMap = new BloomCoarseGrainDataMap(); + String indexPath = ((BloomDataMapDistributable) distributable).getIndexPath(); + bloomCoarseGrainDataMap.init(new DataMapModel(indexPath)); + coarseGrainDataMaps.add(bloomCoarseGrainDataMap); + return coarseGrainDataMaps; + } + + /** + * returns all the directories of lucene index files for query + * Note: copied from luceneDataMapFactory, will extract to a common interface --- End diff -- Will do it after your PR #2255 is merged --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2272 Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/4577/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2272 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/5744/ --- |
Free forum by Nabble | Edit this page |