/** * get list of partitions to prune */ public static List<PartitionSpec> getPartitionsToPrune(Configuration configuration) throws IOException { String partitionString = configuration.get(PARTITIONS_TO_PRUNE); if (partitionString != null) { return (List<PartitionSpec>) ObjectSerializationUtil.convertStringToObject(partitionString); } return null; }
private static StructType getInputSchema(Configuration configuration) throws IOException { String encodedString = configuration.get(INPUT_SCHEMA); if (encodedString != null) { return (StructType) ObjectSerializationUtil.convertStringToObject(encodedString); } return null; }
public static ReadCommittedScope getReadCommittedScope(Configuration configuration) throws IOException { String subFoldersString = configuration.get(READ_COMMITTED_SCOPE); if (subFoldersString != null) { return (ReadCommittedScope) ObjectSerializationUtil.convertStringToObject(subFoldersString); } return null; }
public static CarbonLoadModel getCarbonLoadModel(Configuration hadoopConf) throws IOException { String value = hadoopConf.get(LOAD_Model); if (value == null) { return null; } else { return (CarbonLoadModel) ObjectSerializationUtil.convertStringToObject(value); } }
/** * get datamap job from the configuration * @param configuration job configuration * @return DataMap Job * @throws IOException */ public static DataMapJob getDataMapJob(Configuration configuration) throws IOException { String jobString = configuration.get(DATA_MAP_DSTR); if (jobString != null) { return (DataMapJob) ObjectSerializationUtil.convertStringToObject(jobString); } return null; }
protected Expression getFilterPredicates(Configuration configuration) { try { String filterExprString = configuration.get(FILTER_PREDICATE); if (filterExprString == null) { return null; } Object filter = ObjectSerializationUtil.convertStringToObject(filterExprString); return (Expression) filter; } catch (IOException e) { throw new RuntimeException("Error while reading filter expression", e); } }
private static String[] getTempStoreLocations(TaskAttemptContext taskAttemptContext) throws IOException { String encodedString = taskAttemptContext.getConfiguration().get(TEMP_STORE_LOCATIONS); if (encodedString != null) { return (String[]) ObjectSerializationUtil.convertStringToObject(encodedString); } return new String[] { System.getProperty("java.io.tmpdir") + "/" + System.nanoTime() + "_" + taskAttemptContext .getTaskAttemptID().toString() }; }
public static CarbonTable getCarbonTable(Configuration configuration) throws IOException { CarbonTable carbonTable = null; String encodedString = configuration.get(TABLE); if (encodedString != null) { byte[] bytes = (byte[]) ObjectSerializationUtil.convertStringToObject(encodedString); TableInfo tableInfo = TableInfo.deserialize(bytes); carbonTable = CarbonTable.buildFromTableInfo(tableInfo); } return carbonTable; }
String encodedString = conf.get(LOAD_MODEL); if (encodedString != null) { model = (CarbonLoadModel) ObjectSerializationUtil.convertStringToObject(encodedString); return model;