/** * Store a collection of Map.Entry's in conf, with each entry separated by ',' * and key values delimited by {@link #KVP_DELIMITER} * * @param conf configuration to store the collection in * @param key overall key to store keyValues under * @param keyValues kvps to be stored under key in conf */ public static void setKeyValues(Configuration conf, String key, Collection<Map.Entry<String, String>> keyValues) { setKeyValues(conf, key, keyValues, KVP_DELIMITER); }
public void setSnapshotDirs(Configuration conf, Map<String, Path> snapshotDirs) { Map<String, String> toSet = Maps.newHashMap(); for (Map.Entry<String, Path> entry : snapshotDirs.entrySet()) { toSet.put(entry.getKey(), entry.getValue().toString()); } ConfigurationUtil.setKeyValues(conf, RESTORE_DIRS_KEY, toSet.entrySet()); }
public void callSetKeyValues() { ConfigurationUtil.setKeyValues(conf, key, keyValues.entrySet()); }
/** * Push snapshotScans to conf (under the key {@link #SNAPSHOT_TO_SCANS_KEY}) * * @param conf * @param snapshotScans * @throws IOException */ public void setSnapshotToScans(Configuration conf, Map<String, Collection<Scan>> snapshotScans) throws IOException { // flatten out snapshotScans for serialization to the job conf List<Map.Entry<String, String>> snapshotToSerializedScans = Lists.newArrayList(); for (Map.Entry<String, Collection<Scan>> entry : snapshotScans.entrySet()) { String snapshotName = entry.getKey(); Collection<Scan> scans = entry.getValue(); // serialize all scans and map them to the appropriate snapshot for (Scan scan : scans) { snapshotToSerializedScans.add(new AbstractMap.SimpleImmutableEntry<>(snapshotName, TableMapReduceUtil.convertScanToString(scan))); } } ConfigurationUtil.setKeyValues(conf, SNAPSHOT_TO_SCANS_KEY, snapshotToSerializedScans); }
/** * Store a collection of Map.Entry's in conf, with each entry separated by ',' * and key values delimited by {@link #KVP_DELIMITER} * * @param conf configuration to store the collection in * @param key overall key to store keyValues under * @param keyValues kvps to be stored under key in conf */ public static void setKeyValues(Configuration conf, String key, Collection<Map.Entry<String, String>> keyValues) { setKeyValues(conf, key, keyValues, KVP_DELIMITER); }
public void setSnapshotDirs(Configuration conf, Map<String, Path> snapshotDirs) { Map<String, String> toSet = Maps.newHashMap(); for (Map.Entry<String, Path> entry : snapshotDirs.entrySet()) { toSet.put(entry.getKey(), entry.getValue().toString()); } ConfigurationUtil.setKeyValues(conf, RESTORE_DIRS_KEY, toSet.entrySet()); }
public void setSnapshotDirs(Configuration conf, Map<String, Path> snapshotDirs) { Map<String, String> toSet = Maps.newHashMap(); for (Map.Entry<String, Path> entry : snapshotDirs.entrySet()) { toSet.put(entry.getKey(), entry.getValue().toString()); } ConfigurationUtil.setKeyValues(conf, RESTORE_DIRS_KEY, toSet.entrySet()); }
public void setSnapshotDirs(Configuration conf, Map<String, Path> snapshotDirs) { Map<String, String> toSet = Maps.newHashMap(); for (Map.Entry<String, Path> entry : snapshotDirs.entrySet()) { toSet.put(entry.getKey(), entry.getValue().toString()); } ConfigurationUtil.setKeyValues(conf, RESTORE_DIRS_KEY, toSet.entrySet()); }
public void callSetKeyValues() { ConfigurationUtil.setKeyValues(conf, key, keyValues.entrySet()); }
/** * Push snapshotScans to conf (under the key {@link #SNAPSHOT_TO_SCANS_KEY}) * * @param conf * @param snapshotScans * @throws IOException */ public void setSnapshotToScans(Configuration conf, Map<String, Collection<Scan>> snapshotScans) throws IOException { // flatten out snapshotScans for serialization to the job conf List<Map.Entry<String, String>> snapshotToSerializedScans = Lists.newArrayList(); for (Map.Entry<String, Collection<Scan>> entry : snapshotScans.entrySet()) { String snapshotName = entry.getKey(); Collection<Scan> scans = entry.getValue(); // serialize all scans and map them to the appropriate snapshot for (Scan scan : scans) { snapshotToSerializedScans.add(new AbstractMap.SimpleImmutableEntry<>(snapshotName, TableMapReduceUtil.convertScanToString(scan))); } } ConfigurationUtil.setKeyValues(conf, SNAPSHOT_TO_SCANS_KEY, snapshotToSerializedScans); }
/** * Push snapshotScans to conf (under the key {@link #SNAPSHOT_TO_SCANS_KEY}) * * @param conf * @param snapshotScans * @throws IOException */ public void setSnapshotToScans(Configuration conf, Map<String, Collection<Scan>> snapshotScans) throws IOException { // flatten out snapshotScans for serialization to the job conf List<Map.Entry<String, String>> snapshotToSerializedScans = Lists.newArrayList(); for (Map.Entry<String, Collection<Scan>> entry : snapshotScans.entrySet()) { String snapshotName = entry.getKey(); Collection<Scan> scans = entry.getValue(); // serialize all scans and map them to the appropriate snapshot for (Scan scan : scans) { snapshotToSerializedScans.add(new AbstractMap.SimpleImmutableEntry<>(snapshotName, TableMapReduceUtil.convertScanToString(scan))); } } ConfigurationUtil.setKeyValues(conf, SNAPSHOT_TO_SCANS_KEY, snapshotToSerializedScans); }
/** * Push snapshotScans to conf (under the key {@link #SNAPSHOT_TO_SCANS_KEY}) * * @param conf * @param snapshotScans * @throws IOException */ public void setSnapshotToScans(Configuration conf, Map<String, Collection<Scan>> snapshotScans) throws IOException { // flatten out snapshotScans for serialization to the job conf List<Map.Entry<String, String>> snapshotToSerializedScans = Lists.newArrayList(); for (Map.Entry<String, Collection<Scan>> entry : snapshotScans.entrySet()) { String snapshotName = entry.getKey(); Collection<Scan> scans = entry.getValue(); // serialize all scans and map them to the appropriate snapshot for (Scan scan : scans) { snapshotToSerializedScans.add(new AbstractMap.SimpleImmutableEntry<String, String>(snapshotName, TableMapReduceUtil.convertScanToString(scan))); } } ConfigurationUtil.setKeyValues(conf, SNAPSHOT_TO_SCANS_KEY, snapshotToSerializedScans); }