Example usage for org.apache.hadoop.io BooleanWritable BooleanWritable

List of usage examples for org.apache.hadoop.io BooleanWritable BooleanWritable

Introduction

In this page you can find the example usage for org.apache.hadoop.io BooleanWritable BooleanWritable.

Prototype

public BooleanWritable(boolean value) 

Source Link

Usage

From source file:rugal.hadoop.repartition.enhanced.impl.IntermediateData.java

License:Apache License

public IntermediateData() {
    this.smaller = new BooleanWritable(false);
}

From source file:rugal.hadoop.repartition.enhanced.impl.OptimizedDataJoinMapperBase.java

License:Apache License

@Override
public void configure(JobConf job) {
    super.configure(job);
    this.job = job;
    this.inputFile = job.get("map.input.file");
    this.fileToBeBuffered = job.get("user.file.buffered");
    this.inputTag = generateInputTag(this.inputFile, fileToBeBuffered);
    if (isInputSmaller()) {
        smaller = new BooleanWritable(true);
        outputKey.setOrder(0);/*from w w w  .  ja v a 2  s. co  m*/
    } else {
        smaller = new BooleanWritable(false);
        outputKey.setOrder(1);
    }
}

From source file:thinkbig.hive.udf.UDFMatchAllWords.java

License:Open Source License

public BooleanWritable evaluate(final Text text, final Text pattern) {
    if (text == null || pattern == null) {
        return null;
    }/*from ww  w .  j ava 2s .  co m*/
    return new BooleanWritable(
            MatchUDFUtil.match(text.toString(), pattern.toString(), "keyword", MatchType.AllWords));
}

From source file:thinkbig.hive.udf.UDFMatchAllWordsWithMetric.java

License:Open Source License

public BooleanWritable evaluate(final Text text, final Text pattern, Text algoType) {
    if (text == null || pattern == null || algoType == null) {
        return null;
    }// w  ww. j a va  2  s  . c o  m
    return new BooleanWritable(
            MatchUDFUtil.match(text.toString(), pattern.toString(), algoType.toString(), MatchType.AllWords));
}

From source file:thinkbig.hive.udf.UDFMatchAnyWord.java

License:Open Source License

public BooleanWritable evaluate(final Text text, final Text pattern) {
    if (text == null || pattern == null) {
        return null;
    }//w  ww . j a v  a  2s .  c om
    return new BooleanWritable(
            MatchUDFUtil.match(text.toString(), pattern.toString(), "keyword", MatchType.SomeWords));
}

From source file:thinkbig.hive.udf.UDFMatchAnyWordWithMetric.java

License:Open Source License

public BooleanWritable evaluate(final Text text, final Text pattern, Text algoType) {
    if (text == null || pattern == null || algoType == null) {
        return null;
    }//w w  w . j  ava2s  .  c  o m
    return new BooleanWritable(
            MatchUDFUtil.match(text.toString(), pattern.toString(), algoType.toString(), MatchType.SomeWords));
}

From source file:thinkbig.hive.udf.UDFMatchWholePhrase.java

License:Open Source License

public BooleanWritable evaluate(final Text text, final Text pattern) {
    if (text == null || pattern == null) {
        return null;
    }/*from  w  w  w  .j  a v  a 2 s.  c o  m*/
    return new BooleanWritable(
            MatchUDFUtil.match(text.toString(), pattern.toString(), "keyword", MatchType.WholePhrase));
}

From source file:thinkbig.hive.udf.UDFMatchWholePhraseWithMetric.java

License:Open Source License

public BooleanWritable evaluate(final Text text, final Text pattern, Text algoType) {
    if (text == null || pattern == null || algoType == null) {
        return null;
    }//from  w  w w.  jav a  2  s.c  o  m
    return new BooleanWritable(MatchUDFUtil.match(text.toString(), pattern.toString(), algoType.toString(),
            MatchType.WholePhrase));
}