本文整理汇总了Java中mil.nga.giat.geowave.core.index.ByteArrayId.getBytes方法的典型用法代码示例。如果您正苦于以下问题:Java ByteArrayId.getBytes方法的具体用法?Java ByteArrayId.getBytes怎么用?Java ByteArrayId.getBytes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mil.nga.giat.geowave.core.index.ByteArrayId
的用法示例。
在下文中一共展示了ByteArrayId.getBytes方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: entryIngested
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
public void entryIngested(
final DataStoreEntryInfo entryInfo,
final T entry ) {
for (final ByteArrayId primaryIndexRowId : entryInfo.getRowIds()) {
final ByteArrayId dataId = adapter.getDataId(entry);
if ((dataId != null) && (dataId.getBytes() != null) && (dataId.getBytes().length > 0)) {
secondaryIndexDataStore.storeJoinEntry(
altIndexId,
dataId,
adapter.getAdapterId(),
EMPTY_FIELD_ID,
primaryIndexId,
primaryIndexRowId,
EMPTY_VISIBILITY);
}
}
}
示例2: getCoordinatesPerDimension
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
public MultiDimensionalCoordinates getCoordinatesPerDimension(
final ByteArrayId insertionId ) {
final byte[] rowId = insertionId.getBytes();
if (rowId.length > 0) {
final Integer orderedSfcIndex = orderedSfcIndexToTierId.inverse().get(
rowId[0]);
return new MultiDimensionalCoordinates(
new byte[] {
rowId[0]
},
BinnedSFCUtils.getCoordinatesForId(
rowId,
baseDefinitions,
orderedSfcs[orderedSfcIndex]));
}
else {
LOGGER.warn("Row must at least contain a byte for tier");
}
return null;
}
示例3: getRangeForId
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
public MultiDimensionalNumericData getRangeForId(
final ByteArrayId insertionId ) {
final byte[] rowId = insertionId.getBytes();
if (rowId.length > 0) {
final Integer orderedSfcIndex = orderedSfcIndexToTierId.inverse().get(
rowId[0]);
return BinnedSFCUtils.getRangeForId(
rowId,
baseDefinitions,
orderedSfcs[orderedSfcIndex]);
}
else {
LOGGER.warn("Row must at least contain a byte for tier");
}
return null;
}
示例4: entryIngested
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
public void entryIngested(
final DataStoreEntryInfo entryInfo,
final T entry ) {
for (final ByteArrayId ids : entryInfo.getRowIds()) {
final byte[] idBytes = ids.getBytes();
min = compare(
min,
idBytes,
cardinality(
min,
idBytes)) > 0 ? idBytes : min;
max = compare(
max,
idBytes,
cardinality(
max,
idBytes)) < 0 ? idBytes : max;
}
}
示例5: addToRowIds
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
public static <T> void addToRowIds(
final List<ByteArrayId> rowIds,
final List<ByteArrayId> insertionIds,
final byte[] dataId,
final byte[] adapterId,
final boolean enableDeduplication ) {
final int numberOfDuplicates = insertionIds.size() - 1;
for (final ByteArrayId insertionId : insertionIds) {
final byte[] indexId = insertionId.getBytes();
// because the combination of the adapter ID and data ID
// gaurantees uniqueness, we combine them in the row ID to
// disambiguate index values that are the same, also adding
// enough length values to be able to read the row ID again, we
// lastly add a number of duplicates which can be useful as
// metadata in our de-duplication
// step
rowIds.add(new ByteArrayId(
new EntryRowID(
indexId,
dataId,
adapterId,
enableDeduplication ? numberOfDuplicates : -1).getRowId()));
}
}
示例6: updateDupCounts
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
protected void updateDupCounts(
final DupTracker dupTracker,
final ByteArrayId adapterId,
final DataStoreEntryInfo entryInfo ) {
final ByteArrayId dataId = new ByteArrayId(
entryInfo.getDataId());
for (final ByteArrayId rowId : entryInfo.getRowIds()) {
final GeowaveRowId rowData = new GeowaveRowId(
rowId.getBytes());
final int rowDups = rowData.getNumberOfDuplicates();
if (rowDups > 0) {
if (dupTracker.idMap.get(dataId) == null) {
dupTracker.idMap.put(
dataId,
adapterId);
}
final Integer mapDups = dupTracker.dupCountMap.get(dataId);
if (mapDups == null) {
dupTracker.dupCountMap.put(
dataId,
rowDups);
}
else if (mapDups == 1) {
dupTracker.dupCountMap.remove(dataId);
}
else {
dupTracker.dupCountMap.put(
dataId,
mapDups - 1);
}
}
}
}
示例7: addObject
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
protected void addObject(
final ByteArrayId primaryId,
final ByteArrayId secondaryId,
final T object ) {
final ByteArrayId id = getRowId(object);
addObjectToCache(
primaryId,
secondaryId,
object);
try {
final HBaseWriter writer = operations.createWriter(
getTablename(),
// create table with all possible column families initially
// because it is known
METADATA_CFS,
true);
final RowMutations mutation = new RowMutations(
id.getBytes());
final Put row = new Put(
id.getBytes());
row.addColumn(
toBytes(getColumnFamily()),
toBytes(getColumnQualifier(object)),
PersistenceUtils.toBinary(object));
mutation.add(row);
writer.write(
mutation,
getColumnFamily().toString());
writer.close();
}
catch (final IOException e) {
LOGGER.error(
"Unable add object",
e);
}
}
示例8: getRangeForId
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
public MultiDimensionalNumericData getRangeForId(
final ByteArrayId insertionId ) {
final byte[] rowId = insertionId.getBytes();
return BinnedSFCUtils.getRangeForId(
rowId,
baseDefinitions,
sfc);
}
示例9: getCoordinatesPerDimension
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
public MultiDimensionalCoordinates getCoordinatesPerDimension(
final ByteArrayId insertionId ) {
final byte[] rowId = insertionId.getBytes();
return new MultiDimensionalCoordinates(
new byte[] {
tier
},
BinnedSFCUtils.getCoordinatesForId(
rowId,
baseDefinitions,
sfc));
}
示例10: insertionIdsAdded
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
public void insertionIdsAdded(
final List<ByteArrayId> ids ) {
for (final ByteArrayId id : ids) {
final byte first = id.getBytes()[0];
if (orderedTierIdToSfcIndex.containsKey(first)) {
tierCounts[orderedTierIdToSfcIndex.get(
first).intValue()]++;
}
}
}
示例11: insertionIdsRemoved
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
public void insertionIdsRemoved(
final List<ByteArrayId> ids ) {
for (final ByteArrayId id : ids) {
final byte first = id.getBytes()[0];
if (orderedTierIdToSfcIndex.containsKey(first)) {
tierCounts[orderedTierIdToSfcIndex.get(
first).intValue()]--;
}
}
}
示例12: getRangeForId
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
public MultiDimensionalNumericData getRangeForId(
ByteArrayId insertionId ) {
// select curve based on first byte
byte first = insertionId.getBytes()[0];
if (first == pointCurveMultiDimensionalId) {
return pointCurve.getRanges(insertionId.getBytes());
}
else if (first == xzCurveMultiDimensionalId) {
return xzCurve.getRanges(insertionId.getBytes());
}
else {
return rasterStrategy.getRangeForId(insertionId);
}
}
示例13: getCoordinatesPerDimension
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
public MultiDimensionalCoordinates getCoordinatesPerDimension(
ByteArrayId insertionId ) {
// select curve based on first byte
byte first = insertionId.getBytes()[0];
Coordinate[] coordinates = null;
if (first == pointCurveMultiDimensionalId) {
coordinates = BinnedSFCUtils.getCoordinatesForId(
insertionId.getBytes(),
baseDefinitions,
pointCurve);
}
else if (first == xzCurveMultiDimensionalId) {
coordinates = BinnedSFCUtils.getCoordinatesForId(
insertionId.getBytes(),
baseDefinitions,
xzCurve);
}
else {
return rasterStrategy.getCoordinatesPerDimension(insertionId);
}
return new MultiDimensionalCoordinates(
new byte[] {
first
},
coordinates);
}
示例14: insertionIdsRemoved
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
@Override
public void insertionIdsRemoved(
List<ByteArrayId> insertionIds ) {
for (final ByteArrayId id : insertionIds) {
final byte first = id.getBytes()[0];
if (first == pointCurveMultiDimensionalId) {
pointCurveCount--;
}
else if (first == xzCurveMultiDimensionalId) {
xzCurveCount--;
}
}
}
示例15: getByteArray
import mil.nga.giat.geowave.core.index.ByteArrayId; //导入方法依赖的package包/类
private byte[] getByteArray(
final long value ) {
final MultiDimensionalNumericData indexedRange = getIndexedRange(value);
final List<ByteArrayId> insertionIds = strategy.getInsertionIds(indexedRange);
final ByteArrayId insertionId = insertionIds.get(0);
return insertionId.getBytes();
}