當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。