本文整理汇总了Java中org.apache.avro.reflect.Nullable类的典型用法代码示例。如果您正苦于以下问题:Java Nullable类的具体用法?Java Nullable怎么用?Java Nullable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Nullable类属于org.apache.avro.reflect包,在下文中一共展示了Nullable类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: sendHeartbeat
import org.apache.avro.reflect.Nullable; //导入依赖的package包/类
/**
* sendHeartbeat() tells the NameNode that the DataNode is still
* alive and well. Includes some status info, too.
* It also gives the NameNode a chance to return
* an array of "DatanodeCommand" objects.
* A DatanodeCommand tells the DataNode to invalidate local block(s),
* or to copy them to other DataNodes, etc.
*/
@Nullable
public DatanodeCommand[] sendHeartbeat(DatanodeRegistration registration,
long capacity,
long dfsUsed,
long remaining,
/******* add by xianyu *******/
ServernodeCPUStatus cpuStatus,
ServernodeMEMStatus memStatus,
ServernodeNETStatus[] netStatus,
ServernodeIOStatus[] ioStatus,
/*****************************/
//removed by xianyu
/*
long cpuUsed, //ww added
long memUsed,
long ioUsed, //ww added
*/
int xmitsInProgress, int xceiverCount,
int failedVolumes) throws IOException;
开发者ID:cumulusyebl,项目名称:cumulus,代码行数:30,代码来源:DatanodeProtocol.java
示例2: valuesToSpecificDiff
import org.apache.avro.reflect.Nullable; //导入依赖的package包/类
private static GenericRecord valuesToSpecificDiff(@Nullable Object originalValue, Object changedValue) throws IOException {
if (GenericRecord.class.isAssignableFrom(changedValue.getClass())) {
return AvroDiff.createDiff((GenericRecord) originalValue, (GenericRecord) changedValue, ((GenericRecord) changedValue).getSchema());
} else if (changedValue.getClass().isArray()) {
return null;
} else if (Map.class.isAssignableFrom(changedValue.getClass())) {
if (originalValue != null) {
return AvroDiffMap.createMapDiff(originalValue, changedValue);
} else {
return AvroDiffMap.createMapDiff(Maps.newHashMap(), changedValue);
}
} else {
PrimitiveDiff primitiveDiff = new PrimitiveDiff();
if (Number.class.isAssignableFrom(changedValue.getClass())) {
primitiveDiff = AvroDiffPrimitive.createPrimitiveDiff(originalValue, changedValue, Schema.Type.LONG, Schema.Type.LONG);
} else if (changedValue.getClass().isAssignableFrom(String.class)) {
primitiveDiff = AvroDiffPrimitive.createPrimitiveDiff(originalValue, changedValue, Schema.Type.STRING, Schema.Type.STRING);
} else if (changedValue.getClass().isAssignableFrom(Boolean.class)) {
primitiveDiff = AvroDiffPrimitive.createPrimitiveDiff(originalValue, changedValue, Schema.Type.BOOLEAN, Schema.Type.BOOLEAN);
} else if (changedValue.getClass().isArray()) {
primitiveDiff = AvroDiffPrimitive.createPrimitiveDiff(originalValue, changedValue, Schema.Type.BYTES, Schema.Type.BYTES);
}
return primitiveDiff;
}
}
开发者ID:atlascon,项目名称:avro-diff,代码行数:26,代码来源:AvroDiffMap.java
示例3: forTableView
import org.apache.avro.reflect.Nullable; //导入依赖的package包/类
public String forTableView(String tableName, String view, @Nullable String tableType) {
String url = StringUtil.join("/", StringUtils.chomp(_baseUrl, "/"), "tables", tableName, view);
if (tableType != null) {
url += "?tableType=" + tableType;
}
return url;
}
开发者ID:linkedin,项目名称:pinot,代码行数:8,代码来源:ControllerRequestURLBuilder.java
示例4: getPartitionRanges
import org.apache.avro.reflect.Nullable; //导入依赖的package包/类
/**
* Returns the partition range within which the column values exist.
*
* @return List of ranges for the column values.
*/
@Nullable
public List<IntRange> getPartitionRanges() {
if (partitionRangeStart <= partitionRangeEnd) {
return Arrays.asList(new IntRange(partitionRangeStart, partitionRangeEnd));
} else {
return null;
}
}
开发者ID:linkedin,项目名称:pinot,代码行数:14,代码来源:AbstractColumnStatisticsCollector.java
示例5: getLoadMode
import org.apache.avro.reflect.Nullable; //导入依赖的package包/类
@Nullable
@Override
protected String getLoadMode() {
return "MMAP";
}
开发者ID:linkedin,项目名称:pinot,代码行数:6,代码来源:LLCRealtimeClusterIntegrationTest.java
示例6: getBlockLocations
import org.apache.avro.reflect.Nullable; //导入依赖的package包/类
/**
* Get locations of the blocks of the specified file within the specified range.
* DataNode locations for each block are sorted by
* the proximity to the client.
* <p>
* Return {@link LocatedBlocks} which contains
* file length, blocks and their locations.
* DataNode locations for each block are sorted by
* the distance to the client's address.
* <p>
* The client will then have to contact
* one of the indicated DataNodes to obtain the actual data.
*
* @param src file name
* @param offset range start offset
* @param length range length
*
* @return file length and array of blocks with their locations
*
* @throws AccessControlException If access is denied
* @throws FileNotFoundException If file <code>src</code> does not exist
* @throws UnresolvedLinkException If <code>src</code> contains a symlink
* @throws IOException If an I/O error occurred
*/
@Nullable
public LocatedBlocks getBlockLocations(String src,
long offset,
long length)
throws AccessControlException, FileNotFoundException,
UnresolvedLinkException, IOException;
开发者ID:cumulusyebl,项目名称:cumulus,代码行数:31,代码来源:ClientProtocol.java
示例7: addBlock
import org.apache.avro.reflect.Nullable; //导入依赖的package包/类
/**
* A client that wants to write an additional block to the
* indicated filename (which must currently be open for writing)
* should call addBlock().
*
* addBlock() allocates a new block and datanodes the block data
* should be replicated to.
*
* addBlock() also commits the previous block by reporting
* to the name-node the actual generation stamp and the length
* of the block that the client has transmitted to data-nodes.
*
* @param src the file being created
* @param clientName the name of the client that adds the block
* @param previous previous block
* @param excludeNodes a list of nodes that should not be
* allocated for the current block
*
* @return LocatedBlock allocated block information.
*
* @throws AccessControlException If access is denied
* @throws FileNotFoundException If file <code>src</code> is not found
* @throws NotReplicatedYetException previous blocks of the file are not
* replicated yet. Blocks cannot be added until replication
* completes.
* @throws SafeModeException create not allowed in safemode
* @throws UnresolvedLinkException If <code>src</code> contains a symlink
* @throws IOException If an I/O error occurred
*/
public LocatedBlock[] addBlock(String src, String clientName,
@Nullable Block previous, @Nullable DatanodeInfo[] excludeNodes)
throws AccessControlException, FileNotFoundException,
NotReplicatedYetException, SafeModeException, UnresolvedLinkException,
IOException;
开发者ID:cumulusyebl,项目名称:cumulus,代码行数:35,代码来源:ClientProtocol.java
示例8: distributedUpgradeProgress
import org.apache.avro.reflect.Nullable; //导入依赖的package包/类
/**
* Report distributed upgrade progress or force current upgrade to proceed.
*
* @param action {@link FSConstants.UpgradeAction} to perform
* @return upgrade status information or null if no upgrades are in progress
* @throws IOException
*/
@Nullable
public UpgradeStatusReport distributedUpgradeProgress(UpgradeAction action)
throws IOException;
开发者ID:cumulusyebl,项目名称:cumulus,代码行数:11,代码来源:ClientProtocol.java
示例9: getFileInfo
import org.apache.avro.reflect.Nullable; //导入依赖的package包/类
/**
* Get the file info for a specific file or directory.
* @param src The string representation of the path to the file
*
* @return object containing information regarding the file
* or null if file not found
* @throws AccessControlException permission denied
* @throws FileNotFoundException file <code>src</code> is not found
* @throws UnresolvedLinkException if the path contains a symlink.
* @throws IOException If an I/O error occurred
*/
@Nullable
public HdfsFileStatus getFileInfo(String src) throws AccessControlException,
FileNotFoundException, UnresolvedLinkException, IOException;
开发者ID:cumulusyebl,项目名称:cumulus,代码行数:15,代码来源:ClientProtocol.java
注:本文中的org.apache.avro.reflect.Nullable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论