congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
HBaseProtos$NameStringPair
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/hbase

boolean updateRootDir = false;
for (NameStringPair e : c.getMapEntriesList()) {
 String key = e.getName();
  String hostnameFromMasterPOV = e.getValue();
  this.serverName = ServerName.valueOf(hostnameFromMasterPOV, rpcServices.isa.getPort(),
    this.startcode);
 String value = e.getValue();
 if (key.equals(HConstants.HBASE_DIR)) {
  if (value != null && !value.equals(conf.get(HConstants.HBASE_DIR))) {
origin: apache/hbase

builder.addConfiguration(HBaseProtos.NameStringPair.newBuilder()
  .setName(entry.getKey())
  .setValue(entry.getValue())
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: com.aliyun.hbase/alihbase-client

builder.addConfiguration(HBaseProtos.NameStringPair.newBuilder()
  .setName(entry.getKey())
  .setValue(entry.getValue())
origin: com.aliyun.hbase/alihbase-client

builder.putConfiguration(pair.getName(), pair.getValue());
origin: com.aliyun.hbase/alihbase-client

/**
 * Converts an ColumnFamilyDescriptor to ColumnFamilySchema
 * @param hcd the ColumnFamilySchema
 * @return Convert this instance to a the pb column family type
 */
public static ColumnFamilySchema toColumnFamilySchema(ColumnFamilyDescriptor hcd) {
 ColumnFamilySchema.Builder builder = ColumnFamilySchema.newBuilder();
 builder.setName(UnsafeByteOperations.unsafeWrap(hcd.getName()));
 for (Map.Entry<Bytes, Bytes> e : hcd.getValues().entrySet()) {
  BytesBytesPair.Builder aBuilder = BytesBytesPair.newBuilder();
  aBuilder.setFirst(UnsafeByteOperations.unsafeWrap(e.getKey().get()));
  aBuilder.setSecond(UnsafeByteOperations.unsafeWrap(e.getValue().get()));
  builder.addAttributes(aBuilder.build());
 }
 for (Map.Entry<String, String> e : hcd.getConfiguration().entrySet()) {
  NameStringPair.Builder aBuilder = NameStringPair.newBuilder();
  aBuilder.setName(e.getKey());
  aBuilder.setValue(e.getValue());
  builder.addConfiguration(aBuilder.build());
 }
 return builder.build();
}
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.NameStringPair)) {
  return super.equals(obj);
 }
 org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair other = (org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair) 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

/**
 * Converts a TableSchema to TableDescriptor
 * @param ts A pb TableSchema instance.
 * @return An {@link TableDescriptor} made from the passed in pb <code>ts</code>.
 */
public static TableDescriptor toTableDescriptor(final TableSchema ts) {
 TableDescriptorBuilder builder
  = TableDescriptorBuilder.newBuilder(ProtobufUtil.toTableName(ts.getTableName()));
 ts.getColumnFamiliesList()
  .stream()
  .map(ProtobufUtil::toColumnFamilyDescriptor)
  .forEach(builder::setColumnFamily);
 ts.getAttributesList()
  .forEach(a -> builder.setValue(a.getFirst().toByteArray(), a.getSecond().toByteArray()));
 ts.getConfigurationList()
  .forEach(a -> builder.setValue(a.getName(), a.getValue()));
 return builder.build();
}
origin: org.apache.hbase/hbase-protocol-shaded

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

/**
 * <pre>
 **
 * Configuration for the regionserver to use: e.g. filesystem,
 * hbase rootdir, the hostname to use creating the RegionServer ServerName,
 * etc
 * </pre>
 *
 * <code>repeated .hbase.pb.NameStringPair map_entries = 1;</code>
 */
public org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair.Builder addMapEntriesBuilder(
  int index) {
 return getMapEntriesFieldBuilder().addBuilder(
   index, org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair.getDefaultInstance());
}
/**
origin: org.apache.hbase/hbase-protocol-shaded

/**
 * <pre>
 **
 * Configuration for the regionserver to use: e.g. filesystem,
 * hbase rootdir, the hostname to use creating the RegionServer ServerName,
 * etc
 * </pre>
 *
 * <code>repeated .hbase.pb.NameStringPair map_entries = 1;</code>
 */
public org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair.Builder addMapEntriesBuilder() {
 return getMapEntriesFieldBuilder().addBuilder(
   org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair.getDefaultInstance());
}
/**
origin: org.apache.hbase/hbase-protocol-shaded

public org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair buildPartial() {
 org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair result = new org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair(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: com.aliyun.hbase/alihbase-client

/**
 * Converts a ColumnFamilySchema to ColumnFamilyDescriptor
 * @param cfs the ColumnFamilySchema
 * @return An {@link ColumnFamilyDescriptor} made from the passed in <code>cfs</code>
 */
public static ColumnFamilyDescriptor toColumnFamilyDescriptor(final ColumnFamilySchema cfs) {
 // Use the empty constructor so we preserve the initial values set on construction for things
 // like maxVersion.  Otherwise, we pick up wrong values on deserialization which makes for
 // unrelated-looking test failures that are hard to trace back to here.
 ColumnFamilyDescriptorBuilder builder
  = ColumnFamilyDescriptorBuilder.newBuilder(cfs.getName().toByteArray());
 cfs.getAttributesList().forEach(a -> builder.setValue(a.getFirst().toByteArray(), a.getSecond().toByteArray()));
 cfs.getConfigurationList().forEach(a -> builder.setConfiguration(a.getName(), a.getValue()));
 return builder.build();
}
origin: org.apache.hbase/hbase-protocol-shaded

public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
origin: org.apache.hbase/hbase-protocol-shaded

public org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair getDefaultInstanceForType() {
 return org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair.getDefaultInstance();
}
origin: org.apache.hbase/hbase-protocol-shaded

/**
 * <code>repeated .hbase.pb.NameStringPair configuration = 4;</code>
 */
public org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair.Builder addConfigurationBuilder(
  int index) {
 return getConfigurationFieldBuilder().addBuilder(
   index, org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair.getDefaultInstance());
}
/**
origin: org.apache.hbase/hbase-protocol-shaded

/**
 * <code>repeated .hbase.pb.NameStringPair configuration = 4;</code>
 */
public org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair.Builder addConfigurationBuilder(
  int index) {
 return getConfigurationFieldBuilder().addBuilder(
   index, org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair.getDefaultInstance());
}
/**
origin: com.aliyun.hbase/alihbase-client

public static HBaseProtos.NamespaceDescriptor toProtoNamespaceDescriptor(NamespaceDescriptor ns) {
 HBaseProtos.NamespaceDescriptor.Builder b =
   HBaseProtos.NamespaceDescriptor.newBuilder()
     .setName(ByteString.copyFromUtf8(ns.getName()));
 for(Map.Entry<String, String> entry: ns.getConfiguration().entrySet()) {
  b.addConfiguration(HBaseProtos.NameStringPair.newBuilder()
    .setName(entry.getKey())
    .setValue(entry.getValue()));
 }
 return b.build();
}
origin: com.aliyun.hbase/alihbase-client

public static NamespaceDescriptor toNamespaceDescriptor(HBaseProtos.NamespaceDescriptor desc) {
 NamespaceDescriptor.Builder b = NamespaceDescriptor.create(desc.getName().toStringUtf8());
 for (HBaseProtos.NameStringPair prop : desc.getConfigurationList()) {
  b.addConfiguration(prop.getName(), prop.getValue());
 }
 return b.build();
}
org.apache.hadoop.hbase.shaded.protobuf.generatedHBaseProtos$NameStringPair

Javadoc

Protobuf type hbase.pb.NameStringPair

Most used methods

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

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Top Vim plugins
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