Search in sources :

Example 26 with HashCodeBuilder

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

the class JavaObjectArg method hashCode.

@Override
public int hashCode() {
    HashCodeBuilder hcb = new HashCodeBuilder();
    hcb.append(this.getClass().getName());
    org.apache.thrift7.TFieldIdEnum setField = getSetField();
    if (setField != null) {
        hcb.append(setField.getThriftFieldId());
        Object value = getFieldValue();
        if (value instanceof org.apache.thrift7.TEnum) {
            hcb.append(((org.apache.thrift7.TEnum) getFieldValue()).getValue());
        } else {
            hcb.append(value);
        }
    }
    return hcb.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Example 27 with HashCodeBuilder

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

the class TopologySummary method hashCode.

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();
    boolean present_id = true && (is_set_id());
    builder.append(present_id);
    if (present_id)
        builder.append(id);
    boolean present_name = true && (is_set_name());
    builder.append(present_name);
    if (present_name)
        builder.append(name);
    boolean present_num_tasks = true;
    builder.append(present_num_tasks);
    if (present_num_tasks)
        builder.append(num_tasks);
    boolean present_num_executors = true;
    builder.append(present_num_executors);
    if (present_num_executors)
        builder.append(num_executors);
    boolean present_num_workers = true;
    builder.append(present_num_workers);
    if (present_num_workers)
        builder.append(num_workers);
    boolean present_uptime_secs = true;
    builder.append(present_uptime_secs);
    if (present_uptime_secs)
        builder.append(uptime_secs);
    boolean present_status = true && (is_set_status());
    builder.append(present_status);
    if (present_status)
        builder.append(status);
    return builder.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Example 28 with HashCodeBuilder

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

the class DRPCExecutionException method hashCode.

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();
    boolean present_msg = true && (is_set_msg());
    builder.append(present_msg);
    if (present_msg)
        builder.append(msg);
    return builder.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Example 29 with HashCodeBuilder

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

the class DRPCRequest method hashCode.

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();
    boolean present_func_args = true && (is_set_func_args());
    builder.append(present_func_args);
    if (present_func_args)
        builder.append(func_args);
    boolean present_request_id = true && (is_set_request_id());
    builder.append(present_request_id);
    if (present_request_id)
        builder.append(request_id);
    return builder.toHashCode();
}
Also used : HashCodeBuilder(org.apache.commons.lang.builder.HashCodeBuilder)

Example 30 with HashCodeBuilder

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

the class ErrorInfo method hashCode.

@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder();
    boolean present_error = true && (is_set_error());
    builder.append(present_error);
    if (present_error)
        builder.append(error);
    boolean present_error_time_secs = true;
    builder.append(present_error_time_secs);
    if (present_error_time_secs)
        builder.append(error_time_secs);
    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