public void refreshLabelsCache(byte[] data) throws IOException { List<VisibilityLabel> visibilityLabels = null; try { visibilityLabels = VisibilityUtils.readLabelsFromZKData(data); } catch (DeserializationException dse) { throw new IOException(dse); } this.lock.writeLock().lock(); try { labels.clear(); ordinalVsLabels.clear(); for (VisibilityLabel visLabel : visibilityLabels) { String label = Bytes.toString(visLabel.getLabel().toByteArray()); labels.put(label, visLabel.getOrdinal()); ordinalVsLabels.put(visLabel.getOrdinal(), label); } } finally { this.lock.writeLock().unlock(); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasLabel()) { hash = (37 * hash) + LABEL_FIELD_NUMBER; hash = (53 * hash) + getLabel().hashCode(); } if (hasOrdinal()) { hash = (37 * hash) + ORDINAL_FIELD_NUMBER; hash = (53 * hash) + getOrdinal(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
byte[] label = visLabel.getLabel().toByteArray(); labels.add(label);
byte[] label = visLabel.getLabel().toByteArray(); labels.add(label);
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel other = (org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel) obj; boolean result = true; result = result && (hasLabel() == other.hasLabel()); if (hasLabel()) { result = result && getLabel() .equals(other.getLabel()); } result = result && (hasOrdinal() == other.hasOrdinal()); if (hasOrdinal()) { result = result && (getOrdinal() == other.getOrdinal()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel other = (org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel) obj; boolean result = true; result = result && (hasLabel() == other.hasLabel()); if (hasLabel()) { result = result && getLabel() .equals(other.getLabel()); } result = result && (hasOrdinal() == other.hasOrdinal()); if (hasOrdinal()) { result = result && (getOrdinal() == other.getOrdinal()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel other = (org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel) obj; boolean result = true; result = result && (hasLabel() == other.hasLabel()); if (hasLabel()) { result = result && getLabel() .equals(other.getLabel()); } result = result && (hasOrdinal() == other.hasOrdinal()); if (hasOrdinal()) { result = result && (getOrdinal() == other.getOrdinal()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public void refreshLabelsCache(byte[] data) throws IOException { List<VisibilityLabel> visibilityLabels = null; try { visibilityLabels = VisibilityUtils.readLabelsFromZKData(data); } catch (DeserializationException dse) { throw new IOException(dse); } this.lock.writeLock().lock(); try { labels.clear(); ordinalVsLabels.clear(); for (VisibilityLabel visLabel : visibilityLabels) { String label = Bytes.toString(visLabel.getLabel().toByteArray()); labels.put(label, visLabel.getOrdinal()); ordinalVsLabels.put(visLabel.getOrdinal(), label); } } finally { this.lock.writeLock().unlock(); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasLabel()) { hash = (37 * hash) + LABEL_FIELD_NUMBER; hash = (53 * hash) + getLabel().hashCode(); } if (hasOrdinal()) { hash = (37 * hash) + ORDINAL_FIELD_NUMBER; hash = (53 * hash) + getOrdinal(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasLabel()) { hash = (37 * hash) + LABEL_FIELD_NUMBER; hash = (53 * hash) + getLabel().hashCode(); } if (hasOrdinal()) { hash = (37 * hash) + ORDINAL_FIELD_NUMBER; hash = (53 * hash) + getOrdinal(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasLabel()) { hash = (37 * hash) + LABEL_FIELD_NUMBER; hash = (53 * hash) + getLabel().hashCode(); } if (hasOrdinal()) { hash = (37 * hash) + ORDINAL_FIELD_NUMBER; hash = (53 * hash) + getOrdinal(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
/** * <code>required bytes label = 1;</code> */ public Builder clearLabel() { bitField0_ = (bitField0_ & ~0x00000001); label_ = getDefaultInstance().getLabel(); onChanged(); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel other) { if (other == org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel.getDefaultInstance()) return this; if (other.hasLabel()) { setLabel(other.getLabel()); } if (other.hasOrdinal()) { setOrdinal(other.getOrdinal()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * <code>required bytes label = 1;</code> */ public Builder clearLabel() { bitField0_ = (bitField0_ & ~0x00000001); label_ = getDefaultInstance().getLabel(); onChanged(); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel other) { if (other == org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel.getDefaultInstance()) return this; if (other.hasLabel()) { setLabel(other.getLabel()); } if (other.hasOrdinal()) { setOrdinal(other.getOrdinal()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel other) { if (other == org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel.getDefaultInstance()) return this; if (other.hasLabel()) { setLabel(other.getLabel()); } if (other.hasOrdinal()) { setOrdinal(other.getOrdinal()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * <code>required bytes label = 1;</code> */ public Builder clearLabel() { bitField0_ = (bitField0_ & ~0x00000001); label_ = getDefaultInstance().getLabel(); onChanged(); return this; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel other = (org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel) obj; boolean result = true; result = result && (hasLabel() == other.hasLabel()); if (hasLabel()) { result = result && getLabel() .equals(other.getLabel()); } result = result && (hasOrdinal() == other.hasOrdinal()); if (hasOrdinal()) { result = result && (getOrdinal() == other.getOrdinal()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
/** * <code>required bytes label = 1;</code> */ public Builder clearLabel() { bitField0_ = (bitField0_ & ~0x00000001); label_ = getDefaultInstance().getLabel(); onChanged(); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel other) { if (other == org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabel.getDefaultInstance()) return this; if (other.hasLabel()) { setLabel(other.getLabel()); } if (other.hasOrdinal()) { setOrdinal(other.getOrdinal()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }