Tabnine Logo
HBaseProtos$NameBytesPair.hasValue
Code IndexAdd Tabnine to your IDE (free)

How to use
hasValue
method
in
org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos$NameBytesPair

Best Java code snippets using org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos$NameBytesPair.hasValue (Showing top 12 results out of 315)

origin: apache/hbase

/**
 * Convert a stringified protocol buffer exception Parameter to a Java Exception
 *
 * @param parameter the protocol buffer Parameter to convert
 * @return the converted Exception
 * @throws IOException if failed to deserialize the parameter
 */
@SuppressWarnings("unchecked")
public static Throwable toException(final NameBytesPair parameter) throws IOException {
 if (parameter == null || !parameter.hasValue()) return null;
 String desc = parameter.getValue().toStringUtf8();
 String type = parameter.getName();
 try {
  Class<? extends Throwable> c =
   (Class<? extends Throwable>)Class.forName(type, true, ClassLoaderHolder.CLASS_LOADER);
  Constructor<? extends Throwable> cn = null;
  try {
   cn = c.getDeclaredConstructor(String.class);
   return cn.newInstance(desc);
  } catch (NoSuchMethodException e) {
   // Could be a raw RemoteException. See HBASE-8987.
   cn = c.getDeclaredConstructor(String.class, String.class);
   return cn.newInstance(type, desc);
  }
 } catch (Exception e) {
  throw new IOException(e);
 }
}
origin: apache/hbase

@java.lang.Override
public int hashCode() {
 if (memoizedHashCode != 0) {
  return memoizedHashCode;
 }
 int hash = 41;
 hash = (19 * hash) + getDescriptor().hashCode();
 if (hasName()) {
  hash = (37 * hash) + NAME_FIELD_NUMBER;
  hash = (53 * hash) + getName().hashCode();
 }
 if (hasValue()) {
  hash = (37 * hash) + VALUE_FIELD_NUMBER;
  hash = (53 * hash) + getValue().hashCode();
 }
 hash = (29 * hash) + unknownFields.hashCode();
 memoizedHashCode = hash;
 return hash;
}
origin: apache/hbase

public static Message getResponse(
  org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceResponse
   result,
  com.google.protobuf.Message responsePrototype)
throws IOException {
 Message response;
 if (result.getValue().hasValue()) {
  Message.Builder builder = responsePrototype.newBuilderForType();
  builder.mergeFrom(result.getValue().getValue().newInput());
  response = builder.build();
 } else {
  response = responsePrototype.getDefaultInstanceForType();
 }
 if (LOG.isTraceEnabled()) {
  LOG.trace("Master Result is value=" + response);
 }
 return response;
}
origin: com.aliyun.hbase/alihbase-client

/**
 * Convert a stringified protocol buffer exception Parameter to a Java Exception
 *
 * @param parameter the protocol buffer Parameter to convert
 * @return the converted Exception
 * @throws IOException if failed to deserialize the parameter
 */
@SuppressWarnings("unchecked")
public static Throwable toException(final NameBytesPair parameter) throws IOException {
 if (parameter == null || !parameter.hasValue()) return null;
 String desc = parameter.getValue().toStringUtf8();
 String type = parameter.getName();
 try {
  Class<? extends Throwable> c =
   (Class<? extends Throwable>)Class.forName(type, true, ClassLoaderHolder.CLASS_LOADER);
  Constructor<? extends Throwable> cn = null;
  try {
   cn = c.getDeclaredConstructor(String.class);
   return cn.newInstance(desc);
  } catch (NoSuchMethodException e) {
   // Could be a raw RemoteException. See HBASE-8987.
   cn = c.getDeclaredConstructor(String.class, String.class);
   return cn.newInstance(type, desc);
  }
 } catch (Exception e) {
  throw new IOException(e);
 }
}
origin: org.apache.hbase/hbase-protocol-shaded

@java.lang.Override
public boolean equals(final java.lang.Object obj) {
 if (obj == this) {
  return true;
 }
 if (!(obj instanceof org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair)) {
  return super.equals(obj);
 }
 org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair other = (org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair) obj;
 boolean result = true;
 result = result && (hasName() == other.hasName());
 if (hasName()) {
  result = result && getName()
    .equals(other.getName());
 }
 result = result && (hasValue() == other.hasValue());
 if (hasValue()) {
  result = result && getValue()
    .equals(other.getValue());
 }
 result = result && unknownFields.equals(other.unknownFields);
 return result;
}
origin: org.apache.hbase/hbase-protocol-shaded

@java.lang.Override
public int hashCode() {
 if (memoizedHashCode != 0) {
  return memoizedHashCode;
 }
 int hash = 41;
 hash = (19 * hash) + getDescriptor().hashCode();
 if (hasName()) {
  hash = (37 * hash) + NAME_FIELD_NUMBER;
  hash = (53 * hash) + getName().hashCode();
 }
 if (hasValue()) {
  hash = (37 * hash) + VALUE_FIELD_NUMBER;
  hash = (53 * hash) + getValue().hashCode();
 }
 hash = (29 * hash) + unknownFields.hashCode();
 memoizedHashCode = hash;
 return hash;
}
origin: com.aliyun.hbase/alihbase-client

public static Message getResponse(
  org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceResponse
   result,
  com.google.protobuf.Message responsePrototype)
throws IOException {
 Message response;
 if (result.getValue().hasValue()) {
  Message.Builder builder = responsePrototype.newBuilderForType();
  builder.mergeFrom(result.getValue().getValue().newInput());
  response = builder.build();
 } else {
  response = responsePrototype.getDefaultInstanceForType();
 }
 if (LOG.isTraceEnabled()) {
  LOG.trace("Master Result is value=" + response);
 }
 return response;
}
origin: org.apache.hbase/hbase-protocol-shaded

public Builder mergeFrom(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair other) {
 if (other == org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair.getDefaultInstance()) return this;
 if (other.hasName()) {
  bitField0_ |= 0x00000001;
  name_ = other.name_;
  onChanged();
 }
 if (other.hasValue()) {
  setValue(other.getValue());
 }
 this.mergeUnknownFields(other.unknownFields);
 onChanged();
 return this;
}
origin: org.apache.hbase/hbase-client

/**
 * Convert a stringified protocol buffer exception Parameter to a Java Exception
 *
 * @param parameter the protocol buffer Parameter to convert
 * @return the converted Exception
 * @throws IOException if failed to deserialize the parameter
 */
@SuppressWarnings("unchecked")
public static Throwable toException(final NameBytesPair parameter) throws IOException {
 if (parameter == null || !parameter.hasValue()) return null;
 String desc = parameter.getValue().toStringUtf8();
 String type = parameter.getName();
 try {
  Class<? extends Throwable> c =
   (Class<? extends Throwable>)Class.forName(type, true, ClassLoaderHolder.CLASS_LOADER);
  Constructor<? extends Throwable> cn = null;
  try {
   cn = c.getDeclaredConstructor(String.class);
   return cn.newInstance(desc);
  } catch (NoSuchMethodException e) {
   // Could be a raw RemoteException. See HBASE-8987.
   cn = c.getDeclaredConstructor(String.class, String.class);
   return cn.newInstance(type, desc);
  }
 } catch (Exception e) {
  throw new IOException(e);
 }
}
origin: org.apache.hbase/hbase-client

public static Message getResponse(
  org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceResponse
   result,
  com.google.protobuf.Message responsePrototype)
throws IOException {
 Message response;
 if (result.getValue().hasValue()) {
  Message.Builder builder = responsePrototype.newBuilderForType();
  builder.mergeFrom(result.getValue().getValue().newInput());
  response = builder.build();
 } else {
  response = responsePrototype.getDefaultInstanceForType();
 }
 if (LOG.isTraceEnabled()) {
  LOG.trace("Master Result is value=" + response);
 }
 return response;
}
origin: apache/hbase

@java.lang.Override
public boolean equals(final java.lang.Object obj) {
 if (obj == this) {
  return true;
 }
 if (!(obj instanceof org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair)) {
  return super.equals(obj);
 }
 org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair other = (org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair) obj;
 boolean result = true;
 result = result && (hasName() == other.hasName());
 if (hasName()) {
  result = result && getName()
    .equals(other.getName());
 }
 result = result && (hasValue() == other.hasValue());
 if (hasValue()) {
  result = result && getValue()
    .equals(other.getValue());
 }
 result = result && unknownFields.equals(other.unknownFields);
 return result;
}
origin: apache/hbase

public Builder mergeFrom(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair other) {
 if (other == org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair.getDefaultInstance()) return this;
 if (other.hasName()) {
  bitField0_ |= 0x00000001;
  name_ = other.name_;
  onChanged();
 }
 if (other.hasValue()) {
  setValue(other.getValue());
 }
 this.mergeUnknownFields(other.unknownFields);
 onChanged();
 return this;
}
org.apache.hadoop.hbase.shaded.protobuf.generatedHBaseProtos$NameBytesPairhasValue

Javadoc

optional bytes value = 2;

Popular methods of HBaseProtos$NameBytesPair

  • getName
    required string name = 1;
  • newBuilder
  • getValue
    optional bytes value = 2;
  • <init>
  • equals
  • getDefaultInstance
  • getDescriptor
  • getSerializedSize
  • hasName
    required string name = 1;
  • hashCode
  • isInitialized
  • makeExtensionsImmutable
  • isInitialized,
  • makeExtensionsImmutable,
  • parseUnknownField,
  • toBuilder

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • getSystemService (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now