/** * Sets the batch size of records to read * * @param batch batch size * @return updated CarbonReaderBuilder */ public CarbonReaderBuilder withBatch(int batch) { CarbonProperties.getInstance() .addProperty(CarbonCommonConstants.DETAIL_QUERY_BATCH_SIZE, String.valueOf(batch)); return this; }
/** * Close reader * * @throws IOException */ public void close() throws IOException { validateReader(); CarbonProperties.getInstance() .addProperty(CarbonCommonConstants.DETAIL_QUERY_BATCH_SIZE, String.valueOf(CarbonCommonConstants.DETAIL_QUERY_BATCH_SIZE_DEFAULT)); this.currentReader.close(); this.initialise = false; }
public static CarbonDataLoadConfiguration createConfiguration(CarbonLoadModel loadModel, String[] storeLocation) { CarbonDataProcessorUtil.createLocations(storeLocation); String databaseName = loadModel.getDatabaseName(); String tableName = loadModel.getTableName(); String tempLocationKey = CarbonDataProcessorUtil .getTempStoreLocationKey(databaseName, tableName, loadModel.getSegmentId(), loadModel.getTaskNo(), false, false); CarbonProperties.getInstance().addProperty(tempLocationKey, StringUtils.join(storeLocation, File.pathSeparator)); return createConfiguration(loadModel); }
if (null != appName) { CarbonProperties.getInstance() .addProperty(CarbonCommonConstants.CARBON_WRITTEN_BY_APPNAME, appName);
String tableName = loadModel.getTableName(); String tempLocationKey = databaseName + '_' + tableName + "_1"; CarbonProperties.getInstance().addProperty( tempLocationKey, storeLocation + "/" + databaseName + "/" + tableName); CarbonProperties.getInstance().addProperty("store_output_location", outPutLoc); CarbonProperties.getInstance().addProperty("send.signal.load", "false"); CarbonProperties.getInstance().addProperty("carbon.is.columnar.storage", "true"); CarbonProperties.getInstance().addProperty("carbon.dimension.split.value.in.columnar", "1"); CarbonProperties.getInstance().addProperty("carbon.is.fullyfilled.bits", "true"); CarbonProperties.getInstance().addProperty("is.int.based.indexer", "true"); CarbonProperties.getInstance().addProperty("aggregate.columnar.keyblock", "true"); CarbonProperties.getInstance().addProperty("is.compressed.keyblock", "false");
loadModel.setSdkWriterCores(numOfThreads); CarbonProperties.getInstance() .addProperty(CarbonCommonConstants.CARBON_WRITTEN_BY_APPNAME, writtenByApp); if (hadoopConf == null) { hadoopConf = FileFactory.getConfiguration();