public void testRegexFilter() throws Exception { // set the filter class LOG.info("Testing Regex Filter with patter: \\A10*"); SequenceFileInputFilter.setFilterClass(job, SequenceFileInputFilter.RegexFilter.class); SequenceFileInputFilter.RegexFilter.setPattern( job.getConfiguration(), "\\A10*"); // clean input dir fs.delete(inDir, true); // for a variety of lengths for (int length = 1; length < MAX_LENGTH; length += random.nextInt(MAX_LENGTH / 10) + 1) { LOG.info("******Number of records: " + length); createSequenceFile(length); int count = countRecords(0); assertEquals(count, length==0 ? 0 : (int)Math.log10(length) + 1); } // clean up fs.delete(inDir, true); }
public void testRegexFilter() throws Exception { // set the filter class LOG.info("Testing Regex Filter with patter: \\A10*"); SequenceFileInputFilter.setFilterClass(job, SequenceFileInputFilter.RegexFilter.class); SequenceFileInputFilter.RegexFilter.setPattern( job.getConfiguration(), "\\A10*"); // clean input dir fs.delete(inDir, true); // for a variety of lengths for (int length = 1; length < MAX_LENGTH; length += random.nextInt(MAX_LENGTH / 10) + 1) { LOG.info("******Number of records: " + length); createSequenceFile(length); int count = countRecords(0); assertEquals(count, length==0 ? 0 : (int)Math.log10(length) + 1); } // clean up fs.delete(inDir, true); }
public RegexFilter() { rf = new org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFilter. RegexFilter(); }
public RegexFilter() { rf = new org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFilter. RegexFilter(); }
public RegexFilter() { rf = new org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFilter. RegexFilter(); }
public RegexFilter() { rf = new org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFilter. RegexFilter(); }
public RegexFilter() { rf = new org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFilter. RegexFilter(); }
public static void setPattern(Configuration conf, String regex) throws PatternSyntaxException { org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFilter. RegexFilter.setPattern(conf, regex); }
/** Filtering method * If key matches the regex, return true; otherwise return false * @see org.apache.hadoop.mapred.SequenceFileInputFilter.Filter#accept(Object) */ public boolean accept(Object key) { return rf.accept(key); } }
/** Filtering method * If key matches the regex, return true; otherwise return false * @see org.apache.hadoop.mapred.SequenceFileInputFilter.Filter#accept(Object) */ public boolean accept(Object key) { return rf.accept(key); } }
public static void setPattern(Configuration conf, String regex) throws PatternSyntaxException { org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFilter. RegexFilter.setPattern(conf, regex); }
/** Filtering method * If key matches the regex, return true; otherwise return false * @see org.apache.hadoop.mapred.SequenceFileInputFilter.Filter#accept(Object) */ public boolean accept(Object key) { return rf.accept(key); } }
/** Filtering method * If key matches the regex, return true; otherwise return false * @see org.apache.hadoop.mapred.SequenceFileInputFilter.Filter#accept(Object) */ public boolean accept(Object key) { return rf.accept(key); } }
/** configure the Filter by checking the configuration */ public void setConf(Configuration conf) { rf.setConf(conf); }
/** Filtering method * If key matches the regex, return true; otherwise return false * @see org.apache.hadoop.mapred.SequenceFileInputFilter.Filter#accept(Object) */ public boolean accept(Object key) { return rf.accept(key); } }
public static void setPattern(Configuration conf, String regex) throws PatternSyntaxException { org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFilter. RegexFilter.setPattern(conf, regex); }
/** configure the Filter by checking the configuration */ public void setConf(Configuration conf) { rf.setConf(conf); }
/** configure the Filter by checking the configuration */ public void setConf(Configuration conf) { rf.setConf(conf); }
public static void setPattern(Configuration conf, String regex) throws PatternSyntaxException { org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFilter. RegexFilter.setPattern(conf, regex); }
public static void setPattern(Configuration conf, String regex) throws PatternSyntaxException { org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFilter. RegexFilter.setPattern(conf, regex); }