Tabnine Logo
CoprocessorDescriptor
Code IndexAdd Tabnine to your IDE (free)

How to use
CoprocessorDescriptor
in
co.cask.cdap.spi.hbase

Best Java code snippets using co.cask.cdap.spi.hbase.CoprocessorDescriptor (Showing top 12 results out of 315)

origin: cdapio/cdap

protected void addCoprocessor(HTableDescriptorBuilder tableDescriptor, Class<? extends Coprocessor> coprocessor,
               Integer priority) throws IOException {
 CoprocessorDescriptor descriptor = coprocessorManager.getCoprocessorDescriptor(coprocessor, priority);
 Path path = descriptor.getPath() == null ? null : new Path(descriptor.getPath());
 tableDescriptor.addCoprocessor(descriptor.getClassName(), path, descriptor.getPriority(),
                 descriptor.getProperties());
}
origin: cdapio/cdap

public TableDescriptor(String namespace, String name, Set<ColumnFamilyDescriptor> families,
            Set<CoprocessorDescriptor> coprocessors, Map<String, String> properties) {
 this.namespace = namespace;
 this.name = name;
 this.families = new HashMap<>();
 for (ColumnFamilyDescriptor family : families) {
  this.families.put(family.getName(), family);
 }
 this.coprocessors = new HashMap<>();
 for (CoprocessorDescriptor coprocessor : coprocessors) {
  this.coprocessors.put(coprocessor.getClassName(), coprocessor);
 }
 this.properties = properties == null ? Collections.<String, String>emptyMap()
  : Collections.unmodifiableMap(properties);
}
origin: co.cask.cdap/cdap-data-fabric

protected void addCoprocessor(HTableDescriptorBuilder tableDescriptor, Class<? extends Coprocessor> coprocessor,
               Integer priority) throws IOException {
 CoprocessorDescriptor descriptor = coprocessorManager.getCoprocessorDescriptor(coprocessor, priority);
 Path path = descriptor.getPath() == null ? null : new Path(descriptor.getPath());
 tableDescriptor.addCoprocessor(descriptor.getClassName(), path, descriptor.getPriority(),
                 descriptor.getProperties());
}
origin: cdapio/cdap

public static HTableDescriptor getHTableDescriptor(TableDescriptor descriptor) {
 TableName tableName = TableName.valueOf(descriptor.getNamespace(), descriptor.getName());
 HTableDescriptor htd = new HTableDescriptor(tableName);
 for (Map.Entry<String, ColumnFamilyDescriptor> family : descriptor.getFamilies().entrySet()) {
  htd.addFamily(getHColumnDesciptor(family.getValue()));
 }
 for (Map.Entry<String, CoprocessorDescriptor> coprocessor : descriptor.getCoprocessors().entrySet()) {
  CoprocessorDescriptor cpd = coprocessor.getValue();
  try {
   Path path = cpd.getPath() == null ? null : new Path(cpd.getPath());
   htd.addCoprocessor(cpd.getClassName(), path, cpd.getPriority(), cpd.getProperties());
  } catch (IOException e) {
   LOG.error("Error adding coprocessor.", e);
  }
 }
 for (Map.Entry<String, String> property : descriptor.getProperties().entrySet()) {
  htd.setValue(property.getKey(), property.getValue());
 }
 return htd;
}
origin: caskdata/cdap

public static HTableDescriptor getHTableDescriptor(TableDescriptor descriptor) {
 TableName tableName = TableName.valueOf(descriptor.getNamespace(), descriptor.getName());
 HTableDescriptor htd = new HTableDescriptor(tableName);
 for (Map.Entry<String, ColumnFamilyDescriptor> family : descriptor.getFamilies().entrySet()) {
  htd.addFamily(getHColumnDesciptor(family.getValue()));
 }
 for (Map.Entry<String, CoprocessorDescriptor> coprocessor : descriptor.getCoprocessors().entrySet()) {
  CoprocessorDescriptor cpd = coprocessor.getValue();
  try {
   Path path = cpd.getPath() == null ? null : new Path(cpd.getPath());
   htd.addCoprocessor(cpd.getClassName(), path, cpd.getPriority(), cpd.getProperties());
  } catch (IOException e) {
   LOG.error("Error adding coprocessor.", e);
  }
 }
 for (Map.Entry<String, String> property : descriptor.getProperties().entrySet()) {
  htd.setValue(property.getKey(), property.getValue());
 }
 return htd;
}
origin: caskdata/cdap

public static HTableDescriptor getHTableDescriptor(TableDescriptor descriptor) {
 TableName tableName = TableName.valueOf(descriptor.getNamespace(), descriptor.getName());
 HTableDescriptor htd = new HTableDescriptor(tableName);
 for (Map.Entry<String, ColumnFamilyDescriptor> family : descriptor.getFamilies().entrySet()) {
  htd.addFamily(getHColumnDesciptor(family.getValue()));
 }
 for (Map.Entry<String, CoprocessorDescriptor> coprocessor : descriptor.getCoprocessors().entrySet()) {
  CoprocessorDescriptor cpd = coprocessor.getValue();
  try {
   Path path = cpd.getPath() == null ? null : new Path(cpd.getPath());
   htd.addCoprocessor(cpd.getClassName(), path, cpd.getPriority(), cpd.getProperties());
  } catch (IOException e) {
   LOG.error("Error adding coprocessor.", e);
  }
 }
 for (Map.Entry<String, String> property : descriptor.getProperties().entrySet()) {
  htd.setValue(property.getKey(), property.getValue());
 }
 return htd;
}
origin: cdapio/cdap

public static HTableDescriptor getHTableDescriptor(TableDescriptor descriptor) {
 TableName tableName = TableName.valueOf(descriptor.getNamespace(), descriptor.getName());
 HTableDescriptor htd = new HTableDescriptor(tableName);
 for (Map.Entry<String, ColumnFamilyDescriptor> family : descriptor.getFamilies().entrySet()) {
  htd.addFamily(getHColumnDesciptor(family.getValue()));
 }
 for (Map.Entry<String, CoprocessorDescriptor> coprocessor : descriptor.getCoprocessors().entrySet()) {
  CoprocessorDescriptor cpd = coprocessor.getValue();
  try {
   Path path = cpd.getPath() == null ? null : new Path(cpd.getPath());
   htd.addCoprocessor(cpd.getClassName(), path, cpd.getPriority(), cpd.getProperties());
  } catch (IOException e) {
   LOG.error("Error adding coprocessor.", e);
  }
 }
 for (Map.Entry<String, String> property : descriptor.getProperties().entrySet()) {
  htd.setValue(property.getKey(), property.getValue());
 }
 return htd;
}
origin: caskdata/cdap

public static HTableDescriptor getHTableDescriptor(TableDescriptor descriptor) {
 TableName tableName = TableName.valueOf(descriptor.getNamespace(), descriptor.getName());
 HTableDescriptor htd = new HTableDescriptor(tableName);
 for (Map.Entry<String, ColumnFamilyDescriptor> family : descriptor.getFamilies().entrySet()) {
  htd.addFamily(getHColumnDesciptor(family.getValue()));
 }
 for (Map.Entry<String, CoprocessorDescriptor> coprocessor : descriptor.getCoprocessors().entrySet()) {
  CoprocessorDescriptor cpd = coprocessor.getValue();
  try {
   Path path = cpd.getPath() == null ? null : new Path(cpd.getPath());
   htd.addCoprocessor(cpd.getClassName(), path, cpd.getPriority(), cpd.getProperties());
  } catch (IOException e) {
   LOG.error("Error adding coprocessor.", e);
  }
 }
 for (Map.Entry<String, String> property : descriptor.getProperties().entrySet()) {
  htd.setValue(property.getKey(), property.getValue());
 }
 return htd;
}
origin: cdapio/cdap

public static HTableDescriptor getHTableDescriptor(TableDescriptor descriptor) {
 TableName tableName = TableName.valueOf(descriptor.getNamespace(), descriptor.getName());
 HTableDescriptor htd = new HTableDescriptor(tableName);
 for (Map.Entry<String, ColumnFamilyDescriptor> family : descriptor.getFamilies().entrySet()) {
  htd.addFamily(getHColumnDesciptor(family.getValue()));
 }
 for (Map.Entry<String, CoprocessorDescriptor> coprocessor : descriptor.getCoprocessors().entrySet()) {
  CoprocessorDescriptor cpd = coprocessor.getValue();
  try {
   Path path = cpd.getPath() == null ? null : new Path(cpd.getPath());
   htd.addCoprocessor(cpd.getClassName(), path, cpd.getPriority(), cpd.getProperties());
  } catch (IOException e) {
   LOG.error("Error adding coprocessor.", e);
  }
 }
 for (Map.Entry<String, String> property : descriptor.getProperties().entrySet()) {
  htd.setValue(property.getKey(), property.getValue());
 }
 return htd;
}
origin: cdapio/cdap

public static HTableDescriptor getHTableDescriptor(TableDescriptor descriptor) {
 TableName tableName = TableName.valueOf(descriptor.getNamespace(), descriptor.getName());
 HTableDescriptor htd = new HTableDescriptor(tableName);
 for (Map.Entry<String, ColumnFamilyDescriptor> family : descriptor.getFamilies().entrySet()) {
  htd.addFamily(getHColumnDesciptor(family.getValue()));
 }
 for (Map.Entry<String, CoprocessorDescriptor> coprocessor : descriptor.getCoprocessors().entrySet()) {
  CoprocessorDescriptor cpd = coprocessor.getValue();
  try {
   Path path = cpd.getPath() == null ? null : new Path(cpd.getPath());
   htd.addCoprocessor(cpd.getClassName(), path, cpd.getPriority(), cpd.getProperties());
  } catch (IOException e) {
   LOG.error("Error adding coprocessor.", e);
  }
 }
 for (Map.Entry<String, String> property : descriptor.getProperties().entrySet()) {
  htd.setValue(property.getKey(), property.getValue());
 }
 return htd;
}
origin: caskdata/cdap

Path path = coprocessorDescriptor.getPath() == null ? null : new Path(coprocessorDescriptor.getPath());
newDescriptor.addCoprocessor(coprocessorDescriptor.getClassName(), path, coprocessorDescriptor.getPriority(),
               coprocessorDescriptor.getProperties());
origin: co.cask.cdap/cdap-tms

Path path = coprocessorDescriptor.getPath() == null ? null : new Path(coprocessorDescriptor.getPath());
newDescriptor.addCoprocessor(coprocessorDescriptor.getClassName(), path, coprocessorDescriptor.getPriority(),
               coprocessorDescriptor.getProperties());
co.cask.cdap.spi.hbaseCoprocessorDescriptor

Javadoc

Describes HBase coprocessor.

Most used methods

  • getClassName
  • getPath
  • getPriority
  • getProperties
  • <init>

Popular in Java

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • setRequestProperty (URLConnection)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • 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