Search in sources :

Example 96 with HashCodeBuilder

use of org.apache.commons.lang.builder.HashCodeBuilder in project hive by apache.

the class ZooKeeperHiveLock method hashCode.

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();
    boolean pathPresent = path != null;
    builder.append(pathPresent);
    if (pathPresent) {
        builder.append(path.toCharArray());
    }
    boolean lockObjectPresent = obj != null;
    builder.append(lockObjectPresent);
    if (lockObjectPresent) {
        builder.append(obj.hashCode());
    }
    boolean modePresent = mode != null;
    builder.append(modePresent);
    if (modePresent) {
        builder.append(mode);
    }
    return builder.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Example 97 with HashCodeBuilder

use of org.apache.commons.lang.builder.HashCodeBuilder in project hive by apache.

the class HiveAccumuloMapColumnMapping method hashCode.

@Override
public int hashCode() {
    HashCodeBuilder hcb = new HashCodeBuilder(23, 31);
    hcb.append(columnFamily).append(columnQualifierPrefix).append(keyEncoding).append(valueEncoding);
    return hcb.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Example 98 with HashCodeBuilder

use of org.apache.commons.lang.builder.HashCodeBuilder in project hive by apache.

the class ExprNodeColumnDesc method hashCode.

@Override
public int hashCode() {
    int superHashCode = super.hashCode();
    HashCodeBuilder builder = new HashCodeBuilder();
    builder.appendSuper(superHashCode);
    builder.append(column);
    builder.append(tabAlias);
    return builder.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Example 99 with HashCodeBuilder

use of org.apache.commons.lang.builder.HashCodeBuilder in project hive by apache.

the class ExprNodeConstantDefaultDesc method hashCode.

@Override
public int hashCode() {
    int superHashCode = super.hashCode();
    HashCodeBuilder builder = new HashCodeBuilder();
    builder.appendSuper(superHashCode);
    return builder.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Example 100 with HashCodeBuilder

use of org.apache.commons.lang.builder.HashCodeBuilder in project hive by apache.

the class ExprNodeConstantDesc method hashCode.

@Override
public int hashCode() {
    int superHashCode = super.hashCode();
    HashCodeBuilder builder = new HashCodeBuilder();
    builder.appendSuper(superHashCode);
    builder.append(value);
    return builder.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Aggregations

HashCodeBuilder (org.apache.commons.lang.builder.HashCodeBuilder)183 Writable (org.apache.hadoop.io.Writable)1