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

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

本文整理了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

  1. public AdapterToIndexMapping(final short adapterId, final Index[] indices) {
  2. super();
  3. this.adapterId = adapterId;
  4. indexNames = new String[indices.length];
  5. for (int i = 0; i < indices.length; i++) {
  6. indexNames[i] = indices[i].getName();
  7. }
  8. }

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

  1. @Override
  2. public Object transform(final Object obj) {
  3. indexCache.put(((Index) obj).getName(), (Index) obj);
  4. return obj;
  5. }
  6. }));

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

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

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

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

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

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

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

  1. private void addPairForIndex(
  2. final Map<String, SplitInfo> otherSplitInfo,
  3. final RangeLocationPair pair,
  4. final Index index) {
  5. SplitInfo other = otherSplitInfo.get(index.getName());
  6. if (other == null) {
  7. other = new SplitInfo(index);
  8. otherSplitInfo.put(index.getName(), other);
  9. }
  10. other.getRangeLocationPairs().add(pair);
  11. }

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

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

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

  1. public static RocksDBDataIndexTable getDataIndexTable(
  2. final RocksDBClient client,
  3. final String typeName,
  4. final short adapterId) {
  5. return client.getDataIndexTable(
  6. getTablePrefix(typeName, DataIndexUtils.DATA_ID_INDEX.getName()),
  7. adapterId);
  8. }

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

  1. public void store(final Index index) {
  2. if (!indexStore.indexExists(index.getName())) {
  3. indexStore.addIndex(index);
  4. }
  5. }

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

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

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

  1. public static void addIndex(
  2. final Class<?> implementingClass,
  3. final Configuration config,
  4. final Index index) {
  5. if (index != null) {
  6. config.set(
  7. enumToConfKey(implementingClass, GeoWaveConfg.INDEX, index.getName()),
  8. ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(index)));
  9. }
  10. }

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

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

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

  1. public static RedisMapWrapper getDataIndexMap(
  2. final RedissonClient client,
  3. final Compression compression,
  4. final String namespace,
  5. final String typeName,
  6. final boolean visibilityEnabled) {
  7. return new RedisMapWrapper(
  8. client,
  9. getRowSetPrefix(namespace, typeName, DataIndexUtils.DATA_ID_INDEX.getName()),
  10. compression.getCodec(DEFAULT_CODEC),
  11. visibilityEnabled);
  12. }

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

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

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

  1. @Override
  2. public RowWriter createWriter(final Index index, final InternalDataAdapter<?> adapter) {
  3. return new RocksDBWriter(
  4. client,
  5. adapter.getAdapterId(),
  6. adapter.getTypeName(),
  7. index.getName(),
  8. RocksDBUtils.isSortByTime(adapter));
  9. }

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

  1. @Override
  2. public RowWriter createWriter(final Index index, final InternalDataAdapter<?> adapter) {
  3. return new RedisWriter(
  4. client,
  5. options.getCompression(),
  6. gwNamespace,
  7. adapter.getTypeName(),
  8. index.getName(),
  9. RedisUtils.isSortByTime(adapter),
  10. options.getStoreOptions().isVisibilityEnabled());
  11. }

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

  1. public boolean createIndex(final Index index) throws IOException {
  2. createTable(
  3. index.getIndexStrategy().getPredefinedSplits(),
  4. new GeoWaveColumnFamily[0],
  5. StringColumnFamilyFactory.getSingletonInstance(),
  6. options.isServerSideLibraryEnabled(),
  7. getTableName(index.getName()));
  8. return true;
  9. }

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

  1. default <T> Deleter<T> createDeleter(final ReaderParams<T> readerParams) {
  2. return new QueryAndDeleteByRow<>(
  3. createRowDeleter(
  4. readerParams.getIndex().getName(),
  5. readerParams.getAdapterStore(),
  6. readerParams.getInternalAdapterStore(),
  7. readerParams.getAdditionalAuthorizations()),
  8. createReader(readerParams));
  9. }

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

  1. default void delete(final DataIndexReaderParams readerParams) {
  2. try (QueryAndDeleteByRow<GeoWaveRow> defaultDeleter =
  3. new QueryAndDeleteByRow<>(
  4. createRowDeleter(
  5. DataIndexUtils.DATA_ID_INDEX.getName(),
  6. readerParams.getAdapterStore(),
  7. readerParams.getInternalAdapterStore()),
  8. createReader(readerParams))) {
  9. while (defaultDeleter.hasNext()) {
  10. defaultDeleter.next();
  11. }
  12. }
  13. }

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

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

相关文章