org.locationtech.geowave.core.store.api.Index.getName()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中org.locationtech.geowave.core.store.api.Index.getName()方法的一些代码示例,展示了Index.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Index.getName()方法的具体详情如下:
包路径:org.locationtech.geowave.core.store.api.Index
类名称:Index
方法名:getName

Index.getName介绍

[英]get the name of the index
[中]获取索引的名称

代码示例

代码示例来源:origin: locationtech/geowave

public AdapterToIndexMapping(final short adapterId, final Index[] indices) {
 super();
 this.adapterId = adapterId;
 indexNames = new String[indices.length];
 for (int i = 0; i < indices.length; i++) {
  indexNames[i] = indices[i].getName();
 }
}

代码示例来源:origin: locationtech/geowave

@Override
 public Object transform(final Object obj) {
  indexCache.put(((Index) obj).getName(), (Index) obj);
  return obj;
 }
}));

代码示例来源:origin: locationtech/geowave

@Override
public void addIndex(final Index index) {
 indexMap.put(index.getName(), index);
}

代码示例来源:origin: locationtech/geowave

@Override
 public int compare(final Pair<Index, T> o1, final Pair<Index, T> o2) {
  return o1.getKey().getName().compareTo(o1.getKey().getName());
 }
});

代码示例来源:origin: locationtech/geowave

@Override
public RowWriter createWriter(final Index index, final InternalDataAdapter<?> adapter) {
 createTable(index.getName());
 return new CassandraWriter(index.getName(), this);
}

代码示例来源:origin: locationtech/geowave

private void addPairForIndex(
  final Map<String, SplitInfo> otherSplitInfo,
  final RangeLocationPair pair,
  final Index index) {
 SplitInfo other = otherSplitInfo.get(index.getName());
 if (other == null) {
  other = new SplitInfo(index);
  otherSplitInfo.put(index.getName(), other);
 }
 other.getRangeLocationPairs().add(pair);
}

代码示例来源:origin: locationtech/geowave

@Override
public RowWriter createWriter(final Index index, final InternalDataAdapter<?> adapter) {
 return new MyIndexWriter<>(index.getName());
}

代码示例来源:origin: locationtech/geowave

public static RocksDBDataIndexTable getDataIndexTable(
  final RocksDBClient client,
  final String typeName,
  final short adapterId) {
 return client.getDataIndexTable(
   getTablePrefix(typeName, DataIndexUtils.DATA_ID_INDEX.getName()),
   adapterId);
}

代码示例来源:origin: locationtech/geowave

public void store(final Index index) {
 if (!indexStore.indexExists(index.getName())) {
  indexStore.addIndex(index);
 }
}

代码示例来源:origin: locationtech/geowave

@Override
public RowWriter createWriter(final Index index, final InternalDataAdapter<?> adapter) {
 final boolean isDataIndex = DataIndexUtils.isDataIndex(index.getName());
 final String qName = getQualifiedTableName(index.getName());
 final DynamoDBWriter writer = new DynamoDBWriter(client, qName, isDataIndex);
 createTable(qName, isDataIndex);
 return writer;
}

代码示例来源:origin: locationtech/geowave

public static void addIndex(
  final Class<?> implementingClass,
  final Configuration config,
  final Index index) {
 if (index != null) {
  config.set(
    enumToConfKey(implementingClass, GeoWaveConfg.INDEX, index.getName()),
    ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(index)));
 }
}

代码示例来源:origin: locationtech/geowave

public boolean createIndex(final Index index) throws IOException {
  final String indexName = index.getName();
  return createTable(getQualifiedTableName(indexName), DataIndexUtils.isDataIndex(indexName));
 }
}

代码示例来源:origin: locationtech/geowave

public static RedisMapWrapper getDataIndexMap(
  final RedissonClient client,
  final Compression compression,
  final String namespace,
  final String typeName,
  final boolean visibilityEnabled) {
 return new RedisMapWrapper(
   client,
   getRowSetPrefix(namespace, typeName, DataIndexUtils.DATA_ID_INDEX.getName()),
   compression.getCodec(DEFAULT_CODEC),
   visibilityEnabled);
}

代码示例来源:origin: locationtech/geowave

protected Pair<GeoWaveInputKey, T> valueToEntry(final GeoWaveRow row, final Object value) {
 final short adapterId = row.getAdapterId();
 final T result =
   (T) (isOutputWritable
     ? serializationTool.getHadoopWritableSerializerForAdapter(adapterId).toWritable(value)
     : value);
 final GeoWaveInputKey key = new GeoWaveInputKey(row, index.getName());
 return Pair.of(key, result);
}

代码示例来源:origin: locationtech/geowave

@Override
public RowWriter createWriter(final Index index, final InternalDataAdapter<?> adapter) {
 return new RocksDBWriter(
   client,
   adapter.getAdapterId(),
   adapter.getTypeName(),
   index.getName(),
   RocksDBUtils.isSortByTime(adapter));
}

代码示例来源:origin: locationtech/geowave

@Override
public RowWriter createWriter(final Index index, final InternalDataAdapter<?> adapter) {
 return new RedisWriter(
   client,
   options.getCompression(),
   gwNamespace,
   adapter.getTypeName(),
   index.getName(),
   RedisUtils.isSortByTime(adapter),
   options.getStoreOptions().isVisibilityEnabled());
}

代码示例来源:origin: locationtech/geowave

public boolean createIndex(final Index index) throws IOException {
 createTable(
   index.getIndexStrategy().getPredefinedSplits(),
   new GeoWaveColumnFamily[0],
   StringColumnFamilyFactory.getSingletonInstance(),
   options.isServerSideLibraryEnabled(),
   getTableName(index.getName()));
 return true;
}

代码示例来源:origin: locationtech/geowave

default <T> Deleter<T> createDeleter(final ReaderParams<T> readerParams) {
 return new QueryAndDeleteByRow<>(
   createRowDeleter(
     readerParams.getIndex().getName(),
     readerParams.getAdapterStore(),
     readerParams.getInternalAdapterStore(),
     readerParams.getAdditionalAuthorizations()),
   createReader(readerParams));
}

代码示例来源:origin: locationtech/geowave

default void delete(final DataIndexReaderParams readerParams) {
 try (QueryAndDeleteByRow<GeoWaveRow> defaultDeleter =
   new QueryAndDeleteByRow<>(
     createRowDeleter(
       DataIndexUtils.DATA_ID_INDEX.getName(),
       readerParams.getAdapterStore(),
       readerParams.getInternalAdapterStore()),
     createReader(readerParams))) {
  while (defaultDeleter.hasNext()) {
   defaultDeleter.next();
  }
 }
}

代码示例来源:origin: locationtech/geowave

@Override
public <T> Deleter<T> createDeleter(final ReaderParams<T> readerParams) {
 return new QueryAndDeleteByRow<>(
   createRowDeleter(
     readerParams.getIndex().getName(),
     readerParams.getAdapterStore(),
     readerParams.getInternalAdapterStore(),
     readerParams.getAdditionalAuthorizations()),
   // intentionally don't run this reader as async because it does
   // not work well while simultaneously deleting rows
   new RocksDBReader<>(client, readerParams, false));
}

相关文章

微信公众号

最新文章

更多