本文整理汇总了Java中mil.nga.giat.geowave.core.index.ByteArrayId.getString方法的典型用法代码示例。如果您正苦于以下问题:Java ByteArrayId.getString方法的具体用法?Java ByteArrayId.getString怎么用?Java ByteArrayId.getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mil.nga.giat.geowave.core.index.ByteArrayId
的用法示例。
在下文中一共展示了ByteArrayId.getString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getWriter
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
protected Writer<RowMutations> getWriter(
final ByteArrayId secondaryIndexId ) {
final String secondaryIndexName = secondaryIndexId.getString();
if (writerCache.containsKey(secondaryIndexName)) {
return writerCache.get(secondaryIndexName);
}
HBaseWriter writer = null;
try {
writer = hbaseOperations.createWriter(
secondaryIndexName,
new String[] {},
false);
}
catch (final IOException e) {
LOGGER.error(
"Unable to create HBase Writer.",
e);
return null;
}
writerCache.put(
secondaryIndexName,
writer);
return writer;
}
示例2: getWriter
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
protected Writer<Mutation> getWriter(
final ByteArrayId secondaryIndexId ) {
final String secondaryIndexName = secondaryIndexId.getString();
if (writerCache.containsKey(secondaryIndexName)) {
return writerCache.get(secondaryIndexName);
}
Writer<Mutation> writer = null;
try {
writer = accumuloOperations.createWriter(
secondaryIndexName,
true,
false,
accumuloOptions.isEnableBlockCache(),
null);
writerCache.put(
secondaryIndexName,
writer);
}
catch (final TableNotFoundException e) {
LOGGER.error(
"Error creating writer",
e);
}
return writer;
}
示例3: accept
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
public boolean accept(
final CommonIndexModel indexModel,
final IndexedPersistenceEncoding<?> persistenceEncoding ) {
final ByteArrayId stringBytes = (ByteArrayId) persistenceEncoding.getCommonData().getValue(
fieldId);
if (stringBytes != null) {
String value = stringBytes.getString();
return caseSensitive ? matchValue.equals(value) : matchValue.equalsIgnoreCase(value);
}
return false;
}
示例4: getCombinedId
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
protected ByteArrayId getCombinedId(
final ByteArrayId primaryId,
final ByteArrayId secondaryId ) {
// the secondaryId is optional so check for null
if (secondaryId != null) {
return new ByteArrayId(
primaryId.getString() + "_" + secondaryId.getString());
}
return primaryId;
}
示例5: getColumnQualifier
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
protected String getColumnQualifier(
final ByteArrayId secondaryId ) {
if (secondaryId != null) {
return secondaryId.getString();
}
return null;
}
示例6: addIndex
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
/**
* Add an index-based secondary index key
*
* @param secondaryIndexKey
* @param fieldId
* @param secondaryIndexType
* @param fieldsForPartial
*/
private void addIndex(
final String secondaryIndexKey,
final ByteArrayId fieldId,
final SecondaryIndexType secondaryIndexType,
final List<ByteArrayId> fieldsForPartial ) {
final List<DataStatistics<SimpleFeature>> statistics = new ArrayList<>();
DataStatistics<SimpleFeature> stat = null;
switch (secondaryIndexKey) {
case NumericSecondaryIndexConfiguration.INDEX_KEY:
stat = new FeatureNumericHistogramStatistics(
dataAdapter.getAdapterId(),
fieldId.getString());
statistics.add(stat);
supportedSecondaryIndices.add(new SecondaryIndex<SimpleFeature>(
new NumericIndexStrategy(),
fieldId,
statistics,
secondaryIndexType,
fieldsForPartial));
break;
case TextSecondaryIndexConfiguration.INDEX_KEY:
stat = new FeatureHyperLogLogStatistics(
dataAdapter.getAdapterId(),
fieldId.getString(),
16);
statistics.add(stat);
supportedSecondaryIndices.add(new SecondaryIndex<SimpleFeature>(
new TextIndexStrategy(),
fieldId,
statistics,
secondaryIndexType,
fieldsForPartial));
break;
case TemporalSecondaryIndexConfiguration.INDEX_KEY:
stat = new FeatureNumericHistogramStatistics(
dataAdapter.getAdapterId(),
fieldId.getString());
statistics.add(stat);
supportedSecondaryIndices.add(new SecondaryIndex<SimpleFeature>(
new TemporalIndexStrategy(),
fieldId,
statistics,
secondaryIndexType,
fieldsForPartial));
break;
default:
break;
}
for (final DataStatistics<SimpleFeature> statistic : statistics) {
statsManager.addStats(
statistic,
new FieldIdStatisticVisibility<SimpleFeature>(
statistic.getStatisticsId()));
}
}
示例7: decomposeNameFromId
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
protected static String decomposeNameFromId(
final ByteArrayId id ) {
final String idString = id.getString();
final int pos = idString.lastIndexOf('#');
return idString.substring(pos + 1);
}