Codota Logo
IndexerConf.getUniqueKeyField
Code IndexAdd Codota to your IDE (free)

How to use
getUniqueKeyField
method
in
com.ngdata.hbaseindexer.conf.IndexerConf

Best Java code snippets using com.ngdata.hbaseindexer.conf.IndexerConf.getUniqueKeyField (Showing top 11 results out of 315)

  • Common ways to obtain IndexerConf
private void myMethod () {
IndexerConf i =
  • Codota IconIndexerComponentFactory indexerComponentFactory;indexerComponentFactory.createIndexerConf()
  • Smart code suggestions by Codota
}
origin: NGDATA/hbase-indexer

if (conf.getRowReadMode() != null) indexerEl.setAttribute("read-row",
    conf.getRowReadMode().toString().toLowerCase());
if (conf.getUniqueKeyField() != null) indexerEl.setAttribute("unique-key-field", conf.getUniqueKeyField());
if (conf.getRowField() != null) indexerEl.setAttribute("row-field", conf.getRowField());
if (conf.getColumnFamilyField() != null) indexerEl.setAttribute("column-family-field", conf.getColumnFamilyField());
origin: com.ngdata/hbase-indexer-engine

if (conf.getRowReadMode() != null) indexerEl.setAttribute("read-row",
    conf.getRowReadMode().toString().toLowerCase());
if (conf.getUniqueKeyField() != null) indexerEl.setAttribute("unique-key-field", conf.getUniqueKeyField());
if (conf.getRowField() != null) indexerEl.setAttribute("row-field", conf.getRowField());
if (conf.getColumnFamilyField() != null) indexerEl.setAttribute("column-family-field", conf.getColumnFamilyField());
origin: com.ngdata/hbase-indexer-mr

private Indexer createIndexer(String indexName, Context context, IndexerConf indexerConf, String tableName,
               ResultToSolrMapper mapper, Map<String, String> indexConnectionParams)
    throws IOException, SharderException {
  Configuration conf = context.getConfiguration();
  if (conf.getBoolean(INDEX_DIRECT_WRITE_CONF_KEY, false)) {
    String solrMode = getSolrMode(indexConnectionParams);
    if (solrMode.equals("cloud")) {
      DirectSolrInputDocumentWriter writer = createCloudSolrWriter(
        context, indexConnectionParams, indexerConf.getUniqueKeyField());
      solrDocWriter = wrapInBufferedWriter(context, writer);
      return Indexer.createIndexer(indexName, indexerConf, tableName, mapper, null, null, solrDocWriter);
    } else if (solrMode.equals("classic")) {
      DirectSolrClassicInputDocumentWriter classicSolrWriter = createClassicSolrWriter(context, indexConnectionParams);
      Sharder sharder = createSharder(indexConnectionParams, classicSolrWriter.getNumServers());
      solrDocWriter = wrapInBufferedWriter(context, classicSolrWriter);
      return Indexer.createIndexer(indexName, indexerConf, tableName, mapper, null, sharder, solrDocWriter);
    } else {
      throw new RuntimeException("Only 'cloud' and 'classic' are valid values for solr.mode, but got " + solrMode);
    }
  } else {
    solrDocWriter = new MapReduceSolrInputDocumentWriter(context);
    return Indexer.createIndexer(indexName, indexerConf, tableName, mapper, null, null, solrDocWriter);
  }
}
origin: com.ngdata/hbase-indexer-engine

@Override
protected void calculateIndexUpdates(List<RowData> rowDataList, SolrUpdateCollector updateCollector) throws IOException {
  Map<String, KeyValue> idToKeyValue = calculateUniqueEvents(rowDataList);
  for (Entry<String, KeyValue> idToKvEntry : idToKeyValue.entrySet()) {
    String documentId = idToKvEntry.getKey();
    KeyValue keyValue = idToKvEntry.getValue();
    if (CellUtil.isDelete(keyValue)) {
      handleDelete(documentId, keyValue, updateCollector, uniqueKeyFormatter);
    } else {
      Result result = Result.create(Collections.<Cell>singletonList(keyValue));
      SolrUpdateWriter updateWriter = new RowAndFamilyAddingSolrUpdateWriter(
          conf.getRowField(),
          conf.getColumnFamilyField(),
          uniqueKeyFormatter,
          keyValue,
          new IdAddingSolrUpdateWriter(
              conf.getUniqueKeyField(),
              documentId,
              conf.getTableNameField(),
              tableName,
              updateCollector));
      mapper.map(result, updateWriter);
    }
  }
}
origin: NGDATA/hbase-indexer

@Override
protected void calculateIndexUpdates(List<RowData> rowDataList, SolrUpdateCollector updateCollector) throws IOException {
  Map<String, KeyValue> idToKeyValue = calculateUniqueEvents(rowDataList);
  for (Entry<String, KeyValue> idToKvEntry : idToKeyValue.entrySet()) {
    String documentId = idToKvEntry.getKey();
    KeyValue keyValue = idToKvEntry.getValue();
    if (CellUtil.isDelete(keyValue)) {
      handleDelete(documentId, keyValue, updateCollector, uniqueKeyFormatter);
    } else {
      Result result = Result.create(Collections.<Cell>singletonList(keyValue));
      SolrUpdateWriter updateWriter = new RowAndFamilyAddingSolrUpdateWriter(
          conf.getRowField(),
          conf.getColumnFamilyField(),
          uniqueKeyFormatter,
          keyValue,
          new IdAddingSolrUpdateWriter(
              conf.getUniqueKeyField(),
              documentId,
              conf.getTableNameField(),
              tableName,
              updateCollector));
      mapper.map(result, updateWriter);
    }
  }
}
origin: com.ngdata/hbase-indexer-engine

/**
 * Construct based on an existing {@code IndexerConf}. All initial settings are
 * copied from the supplied configuration
 * 
 * @param indexerConf indexer configuration containing default values
 */
public IndexerConfBuilder(IndexerConf indexerConf) {
  this.table = indexerConf.getTable();
  this.uniqueKeyField = indexerConf.getUniqueKeyField();
  this.rowField = indexerConf.getRowField();
  this.columnFamilyField = indexerConf.getColumnFamilyField();
  this.tableNameField = indexerConf.getTableNameField();
  this.mapperClass = indexerConf.getMapperClass();
  this.uniqueKeyFormatterClass = indexerConf.getUniqueKeyFormatterClass();
  this.rowReadMode = indexerConf.getRowReadMode();
  this.mappingType = indexerConf.getMappingType();
  this.fieldDefinitions = Lists.newArrayList(indexerConf.getFieldDefinitions());
  this.documentExtractDefinitions = Lists.newArrayList(indexerConf.getDocumentExtractDefinitions());
  this.globalParams = Maps.newHashMap(indexerConf.getGlobalParams());
}
origin: NGDATA/hbase-indexer

/**
 * Construct based on an existing {@code IndexerConf}. All initial settings are
 * copied from the supplied configuration
 * 
 * @param indexerConf indexer configuration containing default values
 */
public IndexerConfBuilder(IndexerConf indexerConf) {
  this.table = indexerConf.getTable();
  this.uniqueKeyField = indexerConf.getUniqueKeyField();
  this.rowField = indexerConf.getRowField();
  this.columnFamilyField = indexerConf.getColumnFamilyField();
  this.tableNameField = indexerConf.getTableNameField();
  this.mapperClass = indexerConf.getMapperClass();
  this.uniqueKeyFormatterClass = indexerConf.getUniqueKeyFormatterClass();
  this.rowReadMode = indexerConf.getRowReadMode();
  this.mappingType = indexerConf.getMappingType();
  this.fieldDefinitions = Lists.newArrayList(indexerConf.getFieldDefinitions());
  this.documentExtractDefinitions = Lists.newArrayList(indexerConf.getDocumentExtractDefinitions());
  this.globalParams = Maps.newHashMap(indexerConf.getGlobalParams());
}
origin: com.ngdata/hbase-indexer-mr

String uniqueKeyField = indexerConf.getUniqueKeyField();
Preconditions.checkNotNull(uniqueKeyField);
CloudSolrClient solrServer = new CloudSolrClient.Builder().withZkHost(hbaseIndexingOpts.zkHost).build();
origin: com.ngdata/hbase-indexer-engine

conf.getUniqueKeyField(),
documentId,
conf.getTableNameField(),
origin: NGDATA/hbase-indexer

conf.getUniqueKeyField(),
documentId,
conf.getTableNameField(),
origin: com.ngdata/hbase-indexer-server

if (solrMode.equals("cloud")) {
  int zkSessionTimeout = HBaseIndexerConfiguration.getSessionTimeout(hbaseConf);
  solrWriter = new DirectSolrInputDocumentWriter(indexerDef.getName(), createCloudSolrClient(connectionParams, indexerConf.getUniqueKeyField(), zkSessionTimeout));
} else if (solrMode.equals("classic")) {
  connectionManager = new PoolingClientConnectionManager();
com.ngdata.hbaseindexer.confIndexerConfgetUniqueKeyField

Popular methods of IndexerConf

  • getTable
    Returns the name of the table that this indexer is to be applied to. This may be a regular expressio
  • tableNameIsRegex
    Determine if the table name in this configuration is a regular expression to be applied to multiple
  • getGlobalParams
    Get the map of global configuration parameters for this indexer.
  • getMappingType
  • getRowReadMode
  • setGlobalParams
  • <init>
    Instantiate with a table name expression. The table name expression can be the simple name of a tabl
  • getColumnFamilyField
    Get the name of the Solr field used to identify the HBase column family containing the indexed docum
  • getDocumentExtractDefinitions
  • getFieldDefinitions
  • getMapperClass
  • getRowField
    Get the name of the Solr field used to identify the HBase row containing the indexed document. Only
  • getMapperClass,
  • getRowField,
  • getTableNameField,
  • getUniqueKeyFormatterClass,
  • setColumnFamilyField,
  • setDocumentExtractDefinitions,
  • setFieldDefinitions,
  • setMapperClass,
  • setMappingType

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • addToBackStack (FragmentTransaction)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • JList (javax.swing)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now