List of usage examples for org.apache.hadoop.conf Configuration getBoolean
public boolean getBoolean(String name, boolean defaultValue)
name
property as a boolean
. From source file:net.peacesoft.nutch.crawl.ReFetcher.java
License:Apache License
public static boolean isParsing(Configuration conf) { return conf.getBoolean("fetcher.parse", true); }
From source file:net.peacesoft.nutch.crawl.ReFetcher.java
License:Apache License
public static boolean isStoringContent(Configuration conf) { return conf.getBoolean("fetcher.store.content", true); }
From source file:nl.gridline.zieook.inx.movielens.AggregateAndRecommendReducer.java
License:Apache License
@Override protected void setup(Context context) throws IOException { Configuration jobConf = context.getConfiguration(); recommendationsPerUser = jobConf.getInt(NUM_RECOMMENDATIONS, DEFAULT_NUM_RECOMMENDATIONS); booleanData = jobConf.getBoolean(RecommenderJob.BOOLEAN_DATA, false); indexItemIDMap = TasteHadoopUtils.readItemIDIndexMap(jobConf.get(ITEMID_INDEX_PATH), jobConf); FSDataInputStream in = null;// ww w . j a va 2s . co m try { String itemFilePathString = jobConf.get(ITEMS_FILE); if (itemFilePathString == null) { itemsToRecommendFor = null; } else { Path unqualifiedItemsFilePath = new Path(itemFilePathString); FileSystem fs = FileSystem.get(unqualifiedItemsFilePath.toUri(), jobConf); itemsToRecommendFor = new FastIDSet(); Path itemsFilePath = unqualifiedItemsFilePath.makeQualified(fs); in = fs.open(itemsFilePath); for (String line : new FileLineIterable(in)) { itemsToRecommendFor.add(Long.parseLong(line)); } } } finally { IOUtils.closeStream(in); } }
From source file:org.apache.accumulo.core.client.mapreduce.lib.impl.ConfiguratorBase.java
License:Apache License
/** * Determines if the connector info has already been set for this instance. * * @param implementingClass//from w w w. j a v a2s . c o m * the class whose name will be used as a prefix for the property configuration key * @param conf * the Hadoop configuration object to configure * @return true if the connector info has already been set, false otherwise * @since 1.6.0 * @see #setConnectorInfo(Class, Configuration, String, AuthenticationToken) */ public static Boolean isConnectorInfoSet(Class<?> implementingClass, Configuration conf) { return conf.getBoolean(enumToConfKey(implementingClass, ConnectorInfo.IS_CONFIGURED), false); }
From source file:org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator.java
License:Apache License
/** * Determines whether a configuration has auto-adjust ranges enabled. * * @param implementingClass// ww w . ja v a2s . c o m * the class whose name will be used as a prefix for the property configuration key * @param conf * the Hadoop configuration object to configure * @return false if the feature is disabled, true otherwise * @since 1.6.0 * @see #setAutoAdjustRanges(Class, Configuration, boolean) */ public static Boolean getAutoAdjustRanges(Class<?> implementingClass, Configuration conf) { return conf.getBoolean(enumToConfKey(implementingClass, Features.AUTO_ADJUST_RANGES), true); }
From source file:org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator.java
License:Apache License
/** * Determines whether a configuration has isolation enabled. * * @param implementingClass/*from w ww . j a v a2s . c o m*/ * the class whose name will be used as a prefix for the property configuration key * @param conf * the Hadoop configuration object to configure * @return true if the feature is enabled, false otherwise * @since 1.6.0 * @see #setScanIsolation(Class, Configuration, boolean) */ public static Boolean isIsolated(Class<?> implementingClass, Configuration conf) { return conf.getBoolean(enumToConfKey(implementingClass, Features.SCAN_ISOLATION), false); }
From source file:org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator.java
License:Apache License
/** * Determines whether a configuration uses local iterators. * * @param implementingClass// ww w. java 2 s. c o m * the class whose name will be used as a prefix for the property configuration key * @param conf * the Hadoop configuration object to configure * @return true if the feature is enabled, false otherwise * @since 1.6.0 * @see #setLocalIterators(Class, Configuration, boolean) */ public static Boolean usesLocalIterators(Class<?> implementingClass, Configuration conf) { return conf.getBoolean(enumToConfKey(implementingClass, Features.USE_LOCAL_ITERATORS), false); }
From source file:org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator.java
License:Apache License
/** * Determines whether a configuration has the offline table scan feature enabled. * * @param implementingClass//from w w w . jav a2 s .c o m * the class whose name will be used as a prefix for the property configuration key * @param conf * the Hadoop configuration object to configure * @return true if the feature is enabled, false otherwise * @since 1.6.0 * @see #setOfflineTableScan(Class, Configuration, boolean) */ public static Boolean isOfflineScan(Class<?> implementingClass, Configuration conf) { return conf.getBoolean(enumToConfKey(implementingClass, Features.SCAN_OFFLINE), false); }
From source file:org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator.java
License:Apache License
/** * Determines whether a configuration has the BatchScanner feature enabled. * * @param implementingClass//from w w w . j a v a 2 s.c o m * the class whose name will be used as a prefix for the property configuration key * @param conf * the Hadoop configuration object to configure * @return true if the feature is enabled, false otherwise * @since 1.7.0 * @see #setBatchScan(Class, Configuration, boolean) */ public static Boolean isBatchScan(Class<?> implementingClass, Configuration conf) { return conf.getBoolean(enumToConfKey(implementingClass, Features.BATCH_SCANNER), false); }
From source file:org.apache.accumulo.core.client.mapreduce.lib.impl.OutputConfigurator.java
License:Apache License
/** * Determines whether tables are permitted to be created as needed. * * @param implementingClass/* w w w. j ava 2 s.co m*/ * the class whose name will be used as a prefix for the property configuration key * @param conf * the Hadoop configuration object to configure * @return true if the feature is disabled, false otherwise * @since 1.6.0 * @see #setCreateTables(Class, Configuration, boolean) */ public static Boolean canCreateTables(Class<?> implementingClass, Configuration conf) { return conf.getBoolean(enumToConfKey(implementingClass, Features.CAN_CREATE_TABLES), false); }