Java 类com.facebook.swift.codec.ThriftConstructor 实例源码

项目:hadoop-EAR    文件:HdfsFileStatus.java   
/**
 * Constructor
 * @param length the number of bytes the file has
 * @param isdir if the path is a directory
 * @param block_replication the replication factor
 * @param blocksize the block size
 * @param modification_time modification time
 * @param access_time access time
 * @param permission permission
 * @param owner the owner of the path
 * @param group the group of the path
 * @param path the local name in java UTF8 encoding the same as that in-memory
 */
@ThriftConstructor
public HdfsFileStatus(@ThriftField(1) long length, @ThriftField(2) boolean isdir,
    @ThriftField(3) int block_replication, @ThriftField(4) long blocksize,
    @ThriftField(5) long modification_time, @ThriftField(6) long access_time,
    @ThriftField(7) FsPermission permission, @ThriftField(8) String owner,
    @ThriftField(9) String group, @ThriftField(10) byte[] path) {
  this.length = length;
  this.isdir = isdir;
  this.block_replication = (short)block_replication;
  this.blocksize = blocksize;
  this.modification_time = modification_time;
  this.access_time = access_time;
  this.permission = (permission == null) ? 
                    FsPermission.getDefault() : permission;
  this.owner = (owner == null) ? "" : owner;
  this.group = (group == null) ? "" : group;
  this.path = path;
}
项目:hadoop-EAR    文件:DatanodeInfo.java   
@ThriftConstructor
// Last ThriftField used in superclass: 4
public DatanodeInfo(@ThriftField(1) String name, @ThriftField(2) String storageID,
    @ThriftField(3) int infoPort, @ThriftField(4) int ipcPort, @ThriftField(6) long capacity,
    @ThriftField(7) long dfsUsed, @ThriftField(8) long remaining,
    @ThriftField(9) long namespaceUsed, @ThriftField(10) long lastUpdate,
    @ThriftField(11) int xceiverCount, @ThriftField(12) String networkLocation,
    @ThriftField(13) String hostName, @ThriftField(14) int adminStateOrdinal) {
  super(name, storageID, infoPort, ipcPort);
  this.capacity = capacity;
  this.dfsUsed = dfsUsed;
  this.remaining = remaining;
  this.namespaceUsed = namespaceUsed;
  this.lastUpdate = lastUpdate;
  this.xceiverCount = xceiverCount;
  this.location = networkLocation;
  this.hostName = hostName;
  setAdminState(AdminStates.values()[adminStateOrdinal]);
}
项目:swift-hive-metastore    文件:Index.java   
@ThriftConstructor
public Index(
             @ThriftField(value = 1, name = "indexName") final String indexName,
             @ThriftField(value = 2, name = "indexHandlerClass") final String indexHandlerClass,
             @ThriftField(value = 3, name = "dbName") final String dbName,
             @ThriftField(value = 4, name = "origTableName") final String origTableName,
             @ThriftField(value = 5, name = "createTime") final int createTime,
             @ThriftField(value = 6, name = "lastAccessTime") final int lastAccessTime,
             @ThriftField(value = 7, name = "indexTableName") final String indexTableName,
             @ThriftField(value = 8, name = "sd") final StorageDescriptor sd,
             @ThriftField(value = 9, name = "parameters") final Map<String, String> parameters,
             @ThriftField(value = 10, name = "deferredRebuild") final boolean deferredRebuild)
{
    this.indexName = indexName;
    this.indexHandlerClass = indexHandlerClass;
    this.dbName = dbName;
    this.origTableName = origTableName;
    this.createTime = createTime;
    this.lastAccessTime = lastAccessTime;
    this.indexTableName = indexTableName;
    this.sd = sd;
    this.parameters = parameters;
    this.deferredRebuild = deferredRebuild;
}
项目:swift-hive-metastore    文件:Partition.java   
@ThriftConstructor
public Partition(
                 @ThriftField(value = 1, name = "values") final List<String> values,
                 @ThriftField(value = 2, name = "dbName") final String dbName,
                 @ThriftField(value = 3, name = "tableName") final String tableName,
                 @ThriftField(value = 4, name = "createTime") final int createTime,
                 @ThriftField(value = 5, name = "lastAccessTime") final int lastAccessTime,
                 @ThriftField(value = 6, name = "sd") final StorageDescriptor sd,
                 @ThriftField(value = 7, name = "parameters") final Map<String, String> parameters,
                 @ThriftField(value = 8, name = "privileges") final PrincipalPrivilegeSet privileges,
                 @ThriftField(value = 9, name = "linkTarget") final PartitionIdentifier linkTarget,
                 @ThriftField(value = 10, name = "linkPartitions") final List<PartitionIdentifier> linkPartitions)
{
    this.values = values;
    this.dbName = dbName;
    this.tableName = tableName;
    this.createTime = createTime;
    this.lastAccessTime = lastAccessTime;
    this.sd = sd;
    this.parameters = parameters;
    this.privileges = privileges;
    this.linkTarget = linkTarget;
    this.linkPartitions = linkPartitions;
}
项目:hadoop-EAR    文件:ContentSummary.java   
/** Constructor */
@ThriftConstructor
public ContentSummary(
    @ThriftField(1) long length, @ThriftField(2) long fileCount,
    @ThriftField(3) long directoryCount, @ThriftField(4) long quota,
    @ThriftField(5) long spaceConsumed, @ThriftField(6) long spaceQuota) {
  this.length = length;
  this.fileCount = fileCount;
  this.directoryCount = directoryCount;
  this.quota = quota;
  this.spaceConsumed = spaceConsumed;
  this.spaceQuota = spaceQuota;
}
项目:hadoop-EAR    文件:DatanodeID.java   
/**
 * Create DatanodeID
 * @param name (hostname:portNumber)
 * @param storageID data storage ID
 * @param infoPort info server port 
 * @param ipcPort ipc server port
 */
@ThriftConstructor
public DatanodeID(@ThriftField(1) String name, @ThriftField(2) String storageID,
    @ThriftField(3) int infoPort, @ThriftField(4) int ipcPort) {
  this.name = name;
  this.storageID = storageID;
  this.infoPort = infoPort;
  this.ipcPort = ipcPort;
}
项目:hadoop-EAR    文件:VersionedLocatedBlock.java   
@ThriftConstructor
public VersionedLocatedBlock(@ThriftField(1) Block block,
    @ThriftField(2) List<DatanodeInfo> datanodes, @ThriftField(3) long startOffset,
    @ThriftField(4) boolean corrupt, @ThriftField(5) int dataProtocolVersion) {
  super(block, datanodes, startOffset, corrupt);
  this.dataProtocolVersion = dataProtocolVersion;
}
项目:hadoop-EAR    文件:LocatedBlocks.java   
@ThriftConstructor
public LocatedBlocks(@ThriftField(1) long fileLength,
    @ThriftField(2) List<LocatedBlock> locatedBlocks,
    @ThriftField(3) boolean isUnderConstuction) {
  this.fileLength = fileLength;
  blocks = locatedBlocks;
  underConstruction = isUnderConstuction;
}
项目:hadoop-EAR    文件:LocatedBlockWithMetaInfo.java   
@ThriftConstructor
public LocatedBlockWithMetaInfo(@ThriftField(1) Block block,
    @ThriftField(2) List<DatanodeInfo> datanodes, @ThriftField(3) long startOffset,
    @ThriftField(4) boolean corrupt, @ThriftField(5) int dataProtocolVersion,
    @ThriftField(6) int namespaceId, @ThriftField(7) int methodFingerPrint) {
  super(block, datanodes, startOffset, corrupt, dataProtocolVersion);
  this.namespaceid = namespaceId;
  this.methodFingerPrint = methodFingerPrint;
}
项目:hadoop-EAR    文件:LocatedBlockWithFileName.java   
@ThriftConstructor
public LocatedBlockWithFileName(@ThriftField(1) Block block,
    @ThriftField(2) List<DatanodeInfo> datanodes, @ThriftField(3) long startOffset,
    @ThriftField(4) boolean corrupt, @ThriftField(5) String fileName) {
  super(block, datanodes, startOffset, corrupt);
  this.fullPath = fileName;
}
项目:hadoop-EAR    文件:LocatedBlocksWithMetaInfo.java   
@ThriftConstructor
public LocatedBlocksWithMetaInfo(@ThriftField(1) long fileLength,
    @ThriftField(2) List<LocatedBlock> locatedBlocks, @ThriftField(3) boolean isUnderConstuction,
    @ThriftField(4) int dataProtocolVersion, @ThriftField(5) int namespaceId,
    @ThriftField(6) int methodFingerPrint) {
  super(fileLength, locatedBlocks, isUnderConstuction, dataProtocolVersion);
  this.namespaceid = namespaceId;
  this.methodFingerPrint = methodFingerPrint;
}
项目:hadoop-EAR    文件:LocatedBlockWithOldGS.java   
@ThriftConstructor
public LocatedBlockWithOldGS(@ThriftField(1) Block block,
    @ThriftField(2) List<DatanodeInfo> datanodes, @ThriftField(3) long startOffset,
    @ThriftField(4) boolean corrupt, @ThriftField(5) int dataProtocolVersion,
    @ThriftField(6) int namespaceId, @ThriftField(7) int methodFingerPrint,
    @ThriftField(8) long oldGenerationStamp) {
  super(block, datanodes, startOffset, corrupt, dataProtocolVersion, namespaceId,
      methodFingerPrint);
  this.oldGenerationStamp = oldGenerationStamp;
}
项目:hadoop-EAR    文件:VersionedLocatedBlocks.java   
@ThriftConstructor
public VersionedLocatedBlocks(@ThriftField(1) long fileLength,
    @ThriftField(2) List<LocatedBlock> locatedBlocks, @ThriftField(3) boolean isUnderConstuction,
    @ThriftField(4) int dataProtocolVersion) {
  super(fileLength, locatedBlocks, isUnderConstuction);
  this.dataProtocolVersion = dataProtocolVersion;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public RequestMetaInfo(int clusterId, String resourceId, int namespaceId, int applicationId,
    UnixUserGroupInformation origCaller) {
  this.clusterId = clusterId;
  this.resourceId = resourceId;
  this.namespaceId = namespaceId;
  this.applicationId = applicationId;
  this.origCaller = origCaller;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public GetBlockLocationsRequest(@ThriftField(1) RequestMetaInfo requestMetaInfo,
    @ThriftField(2) String src, @ThriftField(3) long offset, @ThriftField(4) long length) {
  super(requestMetaInfo, src);
  this.offset = offset;
  this.length = length;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public OpenRequest(@ThriftField(1) RequestMetaInfo requestMetaInfo, @ThriftField(2) String src,
    @ThriftField(3) long offset, @ThriftField(4) long length) {
  super(requestMetaInfo, src);
  this.offset = offset;
  this.length = length;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public CreateRequest(@ThriftField(1) RequestMetaInfo requestMetaInfo,
    @ThriftField(2) String src, @ThriftField(3) String clientName,
    @ThriftField(4) @NotNull FsPermission masked, @ThriftField(5) boolean overwrite,
    @ThriftField(6) boolean createParent, @ThriftField(7) short replication,
    @ThriftField(8) long blockSize) {
  super(requestMetaInfo, src, clientName);
  notNull(masked);
  this.masked = masked;
  this.overwrite = overwrite;
  this.createParent = createParent;
  this.replication = replication;
  this.blockSize = blockSize;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public CloseRecoverLeaseRequest(@ThriftField(1) RequestMetaInfo requestMetaInfo,
    @ThriftField(2) String src, @ThriftField(3) String clientName,
    @ThriftField(4) boolean discardLastBlock) {
  super(requestMetaInfo, src, clientName);
  this.discardLastBlock = discardLastBlock;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public SetPermissionRequest(@ThriftField(1) RequestMetaInfo requestMetaInfo,
    @ThriftField(2) String src, @ThriftField(3) @NotNull FsPermission permission) {
  super(requestMetaInfo, src);
  notNull(permission);
  this.permission = permission;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public SetOwnerRequest(@ThriftField(1) RequestMetaInfo requestMetaInfo,
    @ThriftField(2) String src, @ThriftField(3) String username,
    @ThriftField(4) String groupname) {
  super(requestMetaInfo, src);
  this.username = username;
  this.groupname = groupname;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public AbandonBlockRequest(@ThriftField(1) RequestMetaInfo requestMetaInfo,
    @ThriftField(2) String src, @ThriftField(3) String clientName,
    @ThriftField(4) Block block) {
  super(requestMetaInfo, src, clientName);
  this.block = block;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public AddBlockRequest(RequestMetaInfo requestMetaInfo, String src, String clientName,
    List<DatanodeInfo> excludedNodes, List<DatanodeInfo> favoredNodes, long startPos,
    Block lastBlock) {
  super(requestMetaInfo, src, clientName);
  this.excludedNodes = excludedNodes;
  this.favoredNodes = favoredNodes;
  this.startPos = startPos;
  this.lastBlock = lastBlock;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public CompleteRequest(RequestMetaInfo requestMetaInfo, String src, String clientName,
    long fileLen, Block lastBlock) {
  super(requestMetaInfo, src, clientName);
  this.fileLen = fileLen;
  this.lastBlock = lastBlock;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public ConcatRequest(RequestMetaInfo requestMetaInfo, String trg, List<String> srcs,
    boolean restricted) {
  super(requestMetaInfo);
  this.trg = trg;
  this.srcs = srcs;
  this.restricted = restricted;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public MkdirsRequest(RequestMetaInfo requestMetaInfo, String src,
    @NotNull FsPermission masked) {
  super(requestMetaInfo, src);
  notNull(masked);
  this.masked = masked;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public IterativeGetOpenFilesRequest(RequestMetaInfo requestMetaInfo, String src, int millis,
    String start) {
  super(requestMetaInfo, src);
  this.millis = millis;
  this.start = start;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public UpdatePipelineRequest(RequestMetaInfo requestMetaInfo, String clientName, Block oldBlock,
    Block newBlock, List<DatanodeID> newNodes) {
  super(requestMetaInfo, clientName);
  this.oldBlock = oldBlock;
  this.newBlock = newBlock;
  this.newNodes = newNodes;
}
项目:hadoop-EAR    文件:ClientProxyRequests.java   
@ThriftConstructor
public RaidFileRequest(RequestMetaInfo requestMetaInfo, String src, String codecId,
    short expectedSourceReplication) {
  super(requestMetaInfo, src);
  this.codecId = codecId;
  this.expectedSourceReplication = expectedSourceReplication;
}
项目:mandrel    文件:PageRequest.java   
/**
 * Creates a new {@link PageRequest}. Pages are zero indexed, thus providing 0 for {@code page} will return
 * the first page.
 * 
 * @param page
 *            must not be less than zero.
 * @param size
 *            must not be less than one.
 */
@ThriftConstructor
public PageRequest(@ThriftField(value = 1, name = "pageNumber") int page, @ThriftField(value = 2, name = "pageSize") int size) {

    if (page < 0) {
        throw new IllegalArgumentException("Page index must not be less than zero!");
    }

    if (size < 1) {
        throw new IllegalArgumentException("Page size must not be less than one!");
    }

    this.pageNumber = page;
    this.pageSize = size;
}
项目:thrift-swift-finagle-example    文件:ValidationException.java   
@ThriftConstructor
public ValidationException(int errorCode, String field, String message) {
    super(message);
    this.errorCode = errorCode;
    this.message = message;
    this.field = field;
}
项目:swift-hive-metastore    文件:StorageDescriptor.java   
@ThriftConstructor
public StorageDescriptor(
                         @ThriftField(value = 1, name = "cols") final List<FieldSchema> cols,
                         @ThriftField(value = 2, name = "location") final String location,
                         @ThriftField(value = 3, name = "inputFormat") final String inputFormat,
                         @ThriftField(value = 4, name = "outputFormat") final String outputFormat,
                         @ThriftField(value = 5, name = "compressed") final boolean compressed,
                         @ThriftField(value = 6, name = "numBuckets") final int numBuckets,
                         @ThriftField(value = 7, name = "serdeInfo") final SerDeInfo serdeInfo,
                         @ThriftField(value = 8, name = "bucketCols") final List<String> bucketCols,
                         @ThriftField(value = 9, name = "sortCols") final List<Order> sortCols,
                         @ThriftField(value = 10, name = "parameters") final Map<String, String> parameters,
                         @ThriftField(value = 11, name = "skewedInfo") final SkewedInfo skewedInfo,
                         @ThriftField(value = 12, name = "storedAsSubDirectories") final boolean storedAsSubDirectories,
                         @ThriftField(value = 13, name = "statsFresh") final boolean statsFresh)
{
    this.cols = cols;
    this.location = location;
    this.inputFormat = inputFormat;
    this.outputFormat = outputFormat;
    this.compressed = compressed;
    this.numBuckets = numBuckets;
    this.serdeInfo = serdeInfo;
    this.bucketCols = bucketCols;
    this.sortCols = sortCols;
    this.parameters = parameters;
    this.skewedInfo = skewedInfo;
    this.storedAsSubDirectories = storedAsSubDirectories;
    this.statsFresh = statsFresh;
}
项目:swift-hive-metastore    文件:PartitionIdentifier.java   
@ThriftConstructor
public PartitionIdentifier(
                           @ThriftField(value = 1, name = "dbName") final String dbName,
                           @ThriftField(value = 2, name = "tableName") final String tableName,
                           @ThriftField(value = 3, name = "values") final List<String> values)
{
    this.dbName = dbName;
    this.tableName = tableName;
    this.values = values;
}
项目:swift-hive-metastore    文件:Order.java   
@ThriftConstructor
public Order(
             @ThriftField(value = 1, name = "col") final String col,
             @ThriftField(value = 2, name = "order") final int order)
{
    this.col = col;
    this.order = order;
}
项目:swift-hive-metastore    文件:ColumnStatistics.java   
@ThriftConstructor
public ColumnStatistics(
                        @ThriftField(value = 1, name = "statsDesc") final ColumnStatisticsDesc statsDesc,
                        @ThriftField(value = 2, name = "statsObj") final List<ColumnStatisticsObj> statsObj)
{
    this.statsDesc = statsDesc;
    this.statsObj = statsObj;
}
项目:swift-hive-metastore    文件:BooleanColumnStatsData.java   
@ThriftConstructor
public BooleanColumnStatsData(
                              @ThriftField(value = 1, name = "numTrues") final long numTrues,
                              @ThriftField(value = 2, name = "numFalses") final long numFalses,
                              @ThriftField(value = 3, name = "numNulls") final long numNulls)
{
    this.numTrues = numTrues;
    this.numFalses = numFalses;
    this.numNulls = numNulls;
}
项目:swift-hive-metastore    文件:BinaryColumnStatsData.java   
@ThriftConstructor
public BinaryColumnStatsData(
                             @ThriftField(value = 1, name = "maxColLen") final long maxColLen,
                             @ThriftField(value = 2, name = "avgColLen") final double avgColLen,
                             @ThriftField(value = 3, name = "numNulls") final long numNulls)
{
    this.maxColLen = maxColLen;
    this.avgColLen = avgColLen;
    this.numNulls = numNulls;
}
项目:swift-hive-metastore    文件:DoubleColumnStatsData.java   
@ThriftConstructor
public DoubleColumnStatsData(
                             @ThriftField(value = 1, name = "lowValue") final double lowValue,
                             @ThriftField(value = 2, name = "highValue") final double highValue,
                             @ThriftField(value = 3, name = "numNulls") final long numNulls,
                             @ThriftField(value = 4, name = "numDVs") final long numDVs)
{
    this.lowValue = lowValue;
    this.highValue = highValue;
    this.numNulls = numNulls;
    this.numDVs = numDVs;
}
项目:swift-hive-metastore    文件:Version.java   
@ThriftConstructor
public Version(
               @ThriftField(value = 1, name = "version") final String version,
               @ThriftField(value = 2, name = "comments") final String comments)
{
    this.version = version;
    this.comments = comments;
}
项目:swift-hive-metastore    文件:HiveObjectPrivilege.java   
@ThriftConstructor
public HiveObjectPrivilege(
                           @ThriftField(value = 1, name = "hiveObject") final HiveObjectRef hiveObject,
                           @ThriftField(value = 2, name = "principalName") final String principalName,
                           @ThriftField(value = 3, name = "principalType") final PrincipalType principalType,
                           @ThriftField(value = 4, name = "grantInfo") final PrivilegeGrantInfo grantInfo)
{
    this.hiveObject = hiveObject;
    this.principalName = principalName;
    this.principalType = principalType;
    this.grantInfo = grantInfo;
}
项目:swift-hive-metastore    文件:ColumnStatisticsData.java   
@ThriftConstructor
public ColumnStatisticsData(final BooleanColumnStatsData booleanStats)
{
    this.value = booleanStats;
    this.id = 1;
    this.name = "booleanStats";
}