@Override public String[] getStrings(String name) { return encapsulated.getStrings(name); }
@Override public String[] getStrings(String name, String... defaultValue) { return encapsulated.getStrings(name, defaultValue); }
@Override public String[] getStrings(String name) { return encapsulated.getStrings(name); }
@Override public String[] getStrings(String name, String... defaultValue) { return encapsulated.getStrings(name, defaultValue); }
@Override public String[] getStrings(String name) { return conf.getStrings(name); }
@Override public String[] getStrings(String name, String... defaultValue) { return conf.getStrings(name, defaultValue); }
private static String[] getOutputFormatAliases(JobContext context) { return context.getConfiguration().getStrings(MO_ALIASES); }
@Override public void setup(Context context) throws IOException { Configuration conf = context.getConfiguration(); String[] tables = conf.getStrings(TABLES_KEY); this.multiTableSupport = conf.getBoolean(MULTI_TABLES_SUPPORT, false); for (String table : tables) { tableSet.add(table); } } }
@Override public void setup(Context context) throws IOException { String[] tableMap = context.getConfiguration().getStrings(TABLE_MAP_KEY); String[] tablesToUse = context.getConfiguration().getStrings(TABLES_KEY); if (tableMap == null) { tableMap = tablesToUse; } if (tablesToUse == null) { // Then user wants all tables. } else if (tablesToUse.length != tableMap.length) { // this can only happen when WALMapper is used directly by a class other than WALPlayer throw new IOException("Incorrect table mapping specified ."); } int i = 0; if (tablesToUse != null) { for (String table : tablesToUse) { tables.put(TableName.valueOf(table), TableName.valueOf(tableMap[i++])); } } } }
/** * Return the ZK Quorum servers string given the specified configuration * * @param conf * @return Quorum servers String */ private static String getZKQuorumServersStringFromHbaseConfig(Configuration conf) { String defaultClientPort = Integer.toString( conf.getInt(HConstants.ZOOKEEPER_CLIENT_PORT, HConstants.DEFAULT_ZOOKEEPER_CLIENT_PORT)); // Build the ZK quorum server string with "server:clientport" list, separated by ',' final String[] serverHosts = conf.getStrings(HConstants.ZOOKEEPER_QUORUM, HConstants.LOCALHOST); return buildZKQuorumServerString(serverHosts, defaultClientPort); }
private void getPackages() { String[] pkgList = getConf().getStrings(AVRO_REFLECT_PACKAGES); packages = new HashSet<String>(); if (pkgList != null) { for (String pkg : pkgList) { packages.add(pkg.trim()); } } }
private void registerCustomFilter(Configuration conf) { String[] filterList = conf.getStrings(Constants.CUSTOM_FILTERS); if (filterList != null) { for (String filterClass : filterList) { String[] filterPart = filterClass.split(":"); if (filterPart.length != 2) { LOG.warn( "Invalid filter specification " + filterClass + " - skipping"); } else { ParseFilter.registerFilter(filterPart[0], filterPart[1]); } } } } }
private void loadMappingProviders() { String[] providerNames = conf.getStrings(MAPPING_PROVIDERS_CONFIG_KEY, new String[]{}); String providerKey; for (String name : providerNames) { providerKey = MAPPING_PROVIDER_CONFIG_PREFIX + "." + name; Class<?> providerClass = conf.getClass(providerKey, null); if (providerClass == null) { LOG.error("The mapping provider, " + name + " does not have a valid class"); } else { addMappingProvider(name, providerClass); } } }
/** * Run test on configured codecs to make sure supporting libs are in place. * @param c * @throws IOException */ private static void checkCodecs(final Configuration c) throws IOException { // check to see if the codec list is available: String [] codecs = c.getStrings("hbase.regionserver.codecs", (String[])null); if (codecs == null) return; for (String codec : codecs) { if (!CompressionTest.testCompression(codec)) { throw new IOException("Compression codec " + codec + " not supported, aborting RS construction"); } } }
/** * Instantiate and initialize all the file cleaners set in the configuration * @param confKey key to get the file cleaner classes from the configuration */ private void initCleanerChain(String confKey) { this.cleanersChain = new LinkedList<>(); String[] logCleaners = conf.getStrings(confKey); if (logCleaners != null) { for (String className : logCleaners) { T logCleaner = newFileCleaner(className, conf); if (logCleaner != null) { LOG.debug("Initialize cleaner={}", className); this.cleanersChain.add(logCleaner); } } } }
@Override protected void setup(Context context) throws IOException, InterruptedException { Configuration configuration = context.getConfiguration(); String tableName = configuration.get("index.tablename"); String[] fields = configuration.getStrings("index.fields"); String familyName = configuration.get("index.familyname"); family = Bytes.toBytes(familyName); indexes = new TreeMap<>(Bytes.BYTES_COMPARATOR); for(String field : fields) { // if the table is "people" and the field to index is "email", then the // index table will be called "people-email" indexes.put(Bytes.toBytes(field), new ImmutableBytesWritable(Bytes.toBytes(tableName + "-" + field))); } } }
public static void registerFilters(Configuration conf) { String[] filters = conf.getStrings(THRIFT_FILTERS); Splitter splitter = Splitter.on(':'); if(filters != null) { for(String filterClass: filters) { List<String> filterPart = splitter.splitToList(filterClass); if(filterPart.size() != 2) { LOG.warn("Invalid filter specification " + filterClass + " - skipping"); } else { ParseFilter.registerFilter(filterPart.get(0), filterPart.get(1)); } } } }
public static void setupYarnClassPath(Configuration conf, Map<String, String> appMasterEnv) { addToEnvironment( appMasterEnv, Environment.CLASSPATH.name(), appMasterEnv.get(ENV_FLINK_CLASSPATH)); String[] applicationClassPathEntries = conf.getStrings( YarnConfiguration.YARN_APPLICATION_CLASSPATH, YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH); for (String c : applicationClassPathEntries) { addToEnvironment(appMasterEnv, Environment.CLASSPATH.name(), c.trim()); } }
private static String[] getRawCoderNames( Configuration conf, String codecName) { return conf.getStrings( IO_ERASURECODE_CODEC + codecName + ".rawcoders", CodecRegistry.getInstance().getCoderNames(codecName) ); }
@Test public void testDoNotAddDefaultObserver() { conf.setBoolean(REMOVE_QUOTA_ON_TABLE_DELETE, false); master.updateConfigurationForQuotasObserver(conf); // Configuration#getStrings returns null when unset assertNull(conf.getStrings(MASTER_COPROCESSOR_CONF_KEY)); }