当前位置: 首页>>代码示例>>Java>>正文


Java ByteArrayId.getBytes方法代码示例

本文整理汇总了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);
		}
	}
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:19,代码来源:AccumuloDataStore.java

示例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;
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:22,代码来源:TieredSFCIndexStrategy.java

示例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;
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:18,代码来源:TieredSFCIndexStrategy.java

示例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;
	}
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:21,代码来源:RowRangeDataStatistics.java

示例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()));
	}
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:27,代码来源:DataStoreUtils.java

示例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);
			}
		}
	}

}
 
开发者ID:locationtech,项目名称:geowave,代码行数:39,代码来源:AccumuloDataStore.java

示例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);
	}
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:40,代码来源:AbstractHBasePersistence.java

示例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);
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:10,代码来源:SingleTierSubStrategy.java

示例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));
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:14,代码来源:SingleTierSubStrategy.java

示例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()]++;
		}
	}
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:12,代码来源:TieredSFCIndexStrategy.java

示例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()]--;
		}
	}
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:12,代码来源:TieredSFCIndexStrategy.java

示例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);
	}
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:16,代码来源:XZHierarchicalIndexStrategy.java

示例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);
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:31,代码来源:XZHierarchicalIndexStrategy.java

示例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--;
		}
	}
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:14,代码来源:XZHierarchicalIndexStrategy.java

示例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();
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:8,代码来源:SimpleNumericIndexStrategyTest.java


注:本文中的mil.nga.giat.geowave.core.index.ByteArrayId.getBytes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。