public static void setLoadModel(Configuration configuration, CarbonLoadModel loadModel) throws IOException { if (loadModel != null) { configuration.set(LOAD_MODEL, ObjectSerializationUtil.convertObjectToString(loadModel)); } }
public static void setTempStoreLocations(Configuration configuration, String[] tempLocations) throws IOException { if (tempLocations != null && tempLocations.length > 0) { configuration .set(TEMP_STORE_LOCATIONS, ObjectSerializationUtil.convertObjectToString(tempLocations)); } }
public static void setCarbonLoadModel(Configuration hadoopConf, CarbonLoadModel carbonLoadModel) throws IOException { if (carbonLoadModel != null) { hadoopConf.set(LOAD_Model, ObjectSerializationUtil.convertObjectToString(carbonLoadModel)); } }
/** * This method sets the datamapJob in the configuration * @param configuration * @param dataMapJob * @throws IOException */ public static void setDataMapJob(Configuration configuration, Object dataMapJob) throws IOException { if (dataMapJob != null) { String toString = ObjectSerializationUtil.convertObjectToString(dataMapJob); configuration.set(DATA_MAP_DSTR, toString); } }
public static void setReadCommittedScope(Configuration configuration, ReadCommittedScope committedScope) { if (committedScope == null) { return; } try { String subFoldersString = ObjectSerializationUtil.convertObjectToString(committedScope); configuration.set(READ_COMMITTED_SCOPE, subFoldersString); } catch (Exception e) { throw new RuntimeException( "Error while setting committedScope information to Job" + committedScope, e); } }
/** * set list of partitions to prune */ public static void setPartitionsToPrune(Configuration configuration, List<PartitionSpec> partitions) { if (partitions == null) { return; } try { String partitionString = ObjectSerializationUtil.convertObjectToString(new ArrayList<>(partitions)); configuration.set(PARTITIONS_TO_PRUNE, partitionString); } catch (Exception e) { throw new RuntimeException("Error while setting patition information to Job" + partitions, e); } }
/** * It sets unresolved filter expression. * * @param configuration * @para DataMapJob dataMapJob = getDataMapJob(job.getConfiguration()); m filterExpression */ public static void setFilterPredicates(Configuration configuration, Expression filterExpression) { if (filterExpression == null) { return; } try { String filterString = ObjectSerializationUtil.convertObjectToString(filterExpression); configuration.set(FILTER_PREDICATE, filterString); } catch (Exception e) { throw new RuntimeException("Error while setting filter expression to Job", e); } }
public static void setInputSchema(Configuration configuration, StructType inputSchema) throws IOException { if (inputSchema != null && inputSchema.getFields().size() > 0) { configuration.set(INPUT_SCHEMA, ObjectSerializationUtil.convertObjectToString(inputSchema)); } else { throw new UnsupportedOperationException("Input schema must be set"); } }
public static void setCarbonTable(Configuration configuration, CarbonTable carbonTable) throws IOException { if (carbonTable != null) { configuration.set(TABLE, ObjectSerializationUtil.convertObjectToString(carbonTable.getTableInfo().serialize())); } }