class DistributionInfo implements Writeable {

    public static final DistributionInfo DEFAULT_BROADCAST = new DistributionInfo(DistributionType.BROADCAST);
    public static final DistributionInfo DEFAULT_SAME_NODE = new DistributionInfo(DistributionType.SAME_NODE);
    public static final DistributionInfo DEFAULT_MODULO = new DistributionInfo(DistributionType.MODULO);

    private DistributionType distributionType;
    private int distributeByColumn;

    public DistributionInfo(DistributionType distributionType, int distributeByColumn) {
        this.distributionType = distributionType;
        this.distributeByColumn = distributeByColumn;
    }

    public DistributionInfo(StreamInput in) throws IOException {
        distributionType = DistributionType.values()[in.readVInt()];
        distributeByColumn = in.readVInt();
    }

    @Override
    public void writeTo(StreamOutput out) throws IOException {
        out.writeVInt(distributionType.ordinal());
        out.writeVInt(distributeByColumn);
    }

    public DistributionInfo(DistributionType distributionType) {
        this(distributionType, 0);
    }

    public DistributionType distributionType() {
        return distributionType;
    }

    public int distributeByColumn() {
        return distributeByColumn;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DistributionInfo that = (DistributionInfo) o;

        return distributeByColumn == that.distributeByColumn && distributionType == that.distributionType;
    }

    @Override
    public int hashCode() {<FILL_FUNCTION_BODY>}

    @Override
    public String toString() {
        return "DistributionInfo{" +
               "distributionType=" + distributionType +
               ", distributeByColumn=" + distributeByColumn +
               '}';
    }
}

        int result = distributionType.hashCode();
        result = 31 * result + distributeByColumn;
        return result;
    
<no_super_class>