congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
HBaseProtos$NameBytesPair
Code IndexAdd Tabnine to your IDE (free)

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

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

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: apache/hbase

Map<String, byte[]> attributes = scan.getAttributesMap();
if (!attributes.isEmpty()) {
 NameBytesPair.Builder attributeBuilder = NameBytesPair.newBuilder();
 for (Map.Entry<String, byte[]> attribute: attributes.entrySet()) {
  attributeBuilder.setName(attribute.getKey());
origin: com.aliyun.hbase/alihbase-client

put.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
origin: com.aliyun.hbase/alihbase-client

scan.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
origin: com.aliyun.hbase/alihbase-client

Map<String, byte[]> attributes = scan.getAttributesMap();
if (!attributes.isEmpty()) {
 NameBytesPair.Builder attributeBuilder = NameBytesPair.newBuilder();
 for (Map.Entry<String, byte[]> attribute: attributes.entrySet()) {
  attributeBuilder.setName(attribute.getKey());
origin: com.aliyun.hbase/alihbase-client

delete.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
origin: com.aliyun.hbase/alihbase-client

   ": region=" + Bytes.toStringBinary(region) +
   ", row=" + Bytes.toStringBinary(row) +
   ", value=" + serviceResult.getValue().getValue());
   serviceResult.getValue().getValue().toByteArray());
 callback.update(region, row, (R) builder.build());
} catch (IOException e) {
origin: com.aliyun.hbase/alihbase-client

mutation.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
origin: com.aliyun.hbase/alihbase-client

Map<String, byte[]> attributes = get.getAttributesMap();
if (!attributes.isEmpty()) {
 NameBytesPair.Builder attributeBuilder = NameBytesPair.newBuilder();
 for (Map.Entry<String, byte[]> attribute: attributes.entrySet()) {
  attributeBuilder.setName(attribute.getKey());
origin: com.aliyun.hbase/alihbase-client

get.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
origin: com.aliyun.hbase/alihbase-client

get.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
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

/**
 * <code>required .hbase.pb.NameBytesPair exception = 2;</code>
 */
public Builder mergeException(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair value) {
 if (exceptionBuilder_ == null) {
  if (((bitField0_ & 0x00000002) == 0x00000002) &&
    exception_ != null &&
    exception_ != org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair.getDefaultInstance()) {
   exception_ =
    org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair.newBuilder(exception_).mergeFrom(value).buildPartial();
  } else {
   exception_ = value;
  }
  onChanged();
 } else {
  exceptionBuilder_.mergeFrom(value);
 }
 bitField0_ |= 0x00000002;
 return this;
}
/**
origin: com.aliyun.hbase/alihbase-client

/**
 * Code shared by {@link #toMutation(MutationType, Mutation)} and
 * {@link #toMutationNoData(MutationType, Mutation)}
 * @param type
 * @param mutation
 * @return A partly-filled out protobuf'd Mutation.
 */
private static MutationProto.Builder getMutationBuilderAndSetCommonFields(final MutationType type,
  final Mutation mutation, MutationProto.Builder builder) {
 builder.setRow(UnsafeByteOperations.unsafeWrap(mutation.getRow()));
 builder.setMutateType(type);
 builder.setDurability(toDurability(mutation.getDurability()));
 builder.setTimestamp(mutation.getTimestamp());
 Map<String, byte[]> attributes = mutation.getAttributesMap();
 if (!attributes.isEmpty()) {
  NameBytesPair.Builder attributeBuilder = NameBytesPair.newBuilder();
  for (Map.Entry<String, byte[]> attribute: attributes.entrySet()) {
   attributeBuilder.setName(attribute.getKey());
   attributeBuilder.setValue(UnsafeByteOperations.unsafeWrap(attribute.getValue()));
   builder.addAttribute(attributeBuilder.build());
  }
 }
 return builder;
}
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.RegionExceptionMessage)) {
  return super.equals(obj);
 }
 org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionExceptionMessage other = (org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionExceptionMessage) obj;
 boolean result = true;
 result = result && (hasRegion() == other.hasRegion());
 if (hasRegion()) {
  result = result && getRegion()
    .equals(other.getRegion());
 }
 result = result && (hasException() == other.hasException());
 if (hasException()) {
  result = result && getException()
    .equals(other.getException());
 }
 result = result && unknownFields.equals(other.unknownFields);
 return result;
}
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 org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair buildPartial() {
 org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair result = new org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair(this);
 int from_bitField0_ = bitField0_;
 int to_bitField0_ = 0;
 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  to_bitField0_ |= 0x00000001;
 }
 result.name_ = name_;
 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  to_bitField0_ |= 0x00000002;
 }
 result.value_ = value_;
 result.bitField0_ = to_bitField0_;
 onBuilt();
 return result;
}
origin: org.apache.hbase/hbase-protocol-shaded

public org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair getDefaultInstanceForType() {
 return org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair.getDefaultInstance();
}
org.apache.hadoop.hbase.shaded.protobuf.generatedHBaseProtos$NameBytesPair

Javadoc

Protobuf type hbase.pb.NameBytesPair

Most used methods

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

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JFrame (javax.swing)
  • JPanel (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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