kumarvishal09 commented on a change in pull request #3140: [CARBONDATA-3307] Fix Performance Issue in No Sort
URL:
https://github.com/apache/carbondata/pull/3140#discussion_r263346181
##########
File path: processing/src/main/java/org/apache/carbondata/processing/loading/steps/CarbonRowDataWriterProcessorStepImpl.java
##########
@@ -129,20 +128,29 @@ public CarbonRowDataWriterProcessorStepImpl(CarbonDataLoadConfiguration configur
.recordDictionaryValue2MdkAdd2FileTime(CarbonTablePath.DEPRECATED_PARTITION_ID,
System.currentTimeMillis());
+ String[] storeLocation = getStoreLocation();
+ DataMapWriterListener listener = getDataMapWriterListener(0);
+ CarbonFactDataHandlerModel model = CarbonFactDataHandlerModel
+ .createCarbonFactDataHandlerModel(configuration, storeLocation, 0, 0, listener);
+ model.setColumnLocalDictGenMap(localDictionaryGeneratorMap);
+ dataHandler = CarbonFactHandlerFactory.createCarbonFactHandler(model);
+ dataHandler.initialise();
+
if (iterators.length == 1) {
- doExecute(iterators[0], 0);
+ doExecute(iterators[0], 0, dataHandler);
} else {
executorService = Executors.newFixedThreadPool(iterators.length,
new CarbonThreadFactory("NoSortDataWriterPool:" + configuration.getTableIdentifier()
.getCarbonTableIdentifier().getTableName()));
Future[] futures = new Future[iterators.length];
for (int i = 0; i < iterators.length; i++) {
- futures[i] = executorService.submit(new DataWriterRunnable(iterators[i], i));
+ futures[i] = executorService.submit(new DataWriterRunnable(iterators[i], i, dataHandler));
}
for (Future future : futures) {
future.get();
}
}
+ finish(dataHandler, 0);
Review comment:
In Finish method please make carbonfactdatahandler to null
----------------------------------------------------------------
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:
[hidden email]
With regards,
Apache Git Services