FileStatus.java
上传用户:quxuerui
上传日期:2018-01-08
资源大小:41811k
文件大小:10k
源码类别:

网格计算

开发平台:

Java

  1. /**
  2.  * Autogenerated by Thrift
  3.  *
  4.  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5.  */
  6. package org.apache.hadoop.thriftfs.api;
  7. import java.util.List;
  8. import java.util.ArrayList;
  9. import java.util.Map;
  10. import java.util.HashMap;
  11. import java.util.Set;
  12. import java.util.HashSet;
  13. import com.facebook.thrift.*;
  14. import com.facebook.thrift.protocol.*;
  15. import com.facebook.thrift.transport.*;
  16. public class FileStatus implements TBase, java.io.Serializable {
  17.   public String path;
  18.   public long length;
  19.   public boolean isdir;
  20.   public short block_replication;
  21.   public long blocksize;
  22.   public long modification_time;
  23.   public String permission;
  24.   public String owner;
  25.   public String group;
  26.   public final Isset __isset = new Isset();
  27.   public static final class Isset implements java.io.Serializable {
  28.     public boolean path = false;
  29.     public boolean length = false;
  30.     public boolean isdir = false;
  31.     public boolean block_replication = false;
  32.     public boolean blocksize = false;
  33.     public boolean modification_time = false;
  34.     public boolean permission = false;
  35.     public boolean owner = false;
  36.     public boolean group = false;
  37.   }
  38.   public FileStatus() {
  39.   }
  40.   public FileStatus(
  41.     String path,
  42.     long length,
  43.     boolean isdir,
  44.     short block_replication,
  45.     long blocksize,
  46.     long modification_time,
  47.     String permission,
  48.     String owner,
  49.     String group)
  50.   {
  51.     this();
  52.     this.path = path;
  53.     this.__isset.path = true;
  54.     this.length = length;
  55.     this.__isset.length = true;
  56.     this.isdir = isdir;
  57.     this.__isset.isdir = true;
  58.     this.block_replication = block_replication;
  59.     this.__isset.block_replication = true;
  60.     this.blocksize = blocksize;
  61.     this.__isset.blocksize = true;
  62.     this.modification_time = modification_time;
  63.     this.__isset.modification_time = true;
  64.     this.permission = permission;
  65.     this.__isset.permission = true;
  66.     this.owner = owner;
  67.     this.__isset.owner = true;
  68.     this.group = group;
  69.     this.__isset.group = true;
  70.   }
  71.   public boolean equals(Object that) {
  72.     if (that == null)
  73.       return false;
  74.     if (that instanceof FileStatus)
  75.       return this.equals((FileStatus)that);
  76.     return false;
  77.   }
  78.   public boolean equals(FileStatus that) {
  79.     if (that == null)
  80.       return false;
  81.     boolean this_present_path = true && (this.path != null);
  82.     boolean that_present_path = true && (that.path != null);
  83.     if (this_present_path || that_present_path) {
  84.       if (!(this_present_path && that_present_path))
  85.         return false;
  86.       if (!this.path.equals(that.path))
  87.         return false;
  88.     }
  89.     boolean this_present_length = true;
  90.     boolean that_present_length = true;
  91.     if (this_present_length || that_present_length) {
  92.       if (!(this_present_length && that_present_length))
  93.         return false;
  94.       if (this.length != that.length)
  95.         return false;
  96.     }
  97.     boolean this_present_isdir = true;
  98.     boolean that_present_isdir = true;
  99.     if (this_present_isdir || that_present_isdir) {
  100.       if (!(this_present_isdir && that_present_isdir))
  101.         return false;
  102.       if (this.isdir != that.isdir)
  103.         return false;
  104.     }
  105.     boolean this_present_block_replication = true;
  106.     boolean that_present_block_replication = true;
  107.     if (this_present_block_replication || that_present_block_replication) {
  108.       if (!(this_present_block_replication && that_present_block_replication))
  109.         return false;
  110.       if (this.block_replication != that.block_replication)
  111.         return false;
  112.     }
  113.     boolean this_present_blocksize = true;
  114.     boolean that_present_blocksize = true;
  115.     if (this_present_blocksize || that_present_blocksize) {
  116.       if (!(this_present_blocksize && that_present_blocksize))
  117.         return false;
  118.       if (this.blocksize != that.blocksize)
  119.         return false;
  120.     }
  121.     boolean this_present_modification_time = true;
  122.     boolean that_present_modification_time = true;
  123.     if (this_present_modification_time || that_present_modification_time) {
  124.       if (!(this_present_modification_time && that_present_modification_time))
  125.         return false;
  126.       if (this.modification_time != that.modification_time)
  127.         return false;
  128.     }
  129.     boolean this_present_permission = true && (this.permission != null);
  130.     boolean that_present_permission = true && (that.permission != null);
  131.     if (this_present_permission || that_present_permission) {
  132.       if (!(this_present_permission && that_present_permission))
  133.         return false;
  134.       if (!this.permission.equals(that.permission))
  135.         return false;
  136.     }
  137.     boolean this_present_owner = true && (this.owner != null);
  138.     boolean that_present_owner = true && (that.owner != null);
  139.     if (this_present_owner || that_present_owner) {
  140.       if (!(this_present_owner && that_present_owner))
  141.         return false;
  142.       if (!this.owner.equals(that.owner))
  143.         return false;
  144.     }
  145.     boolean this_present_group = true && (this.group != null);
  146.     boolean that_present_group = true && (that.group != null);
  147.     if (this_present_group || that_present_group) {
  148.       if (!(this_present_group && that_present_group))
  149.         return false;
  150.       if (!this.group.equals(that.group))
  151.         return false;
  152.     }
  153.     return true;
  154.   }
  155.   public int hashCode() {
  156.     return 0;
  157.   }
  158.   public void read(TProtocol iprot) throws TException {
  159.     TField field;
  160.     iprot.readStructBegin();
  161.     while (true)
  162.     {
  163.       field = iprot.readFieldBegin();
  164.       if (field.type == TType.STOP) { 
  165.         break;
  166.       }
  167.       switch (field.id)
  168.       {
  169.         case 1:
  170.           if (field.type == TType.STRING) {
  171.             this.path = iprot.readString();
  172.             this.__isset.path = true;
  173.           } else { 
  174.             TProtocolUtil.skip(iprot, field.type);
  175.           }
  176.           break;
  177.         case 2:
  178.           if (field.type == TType.I64) {
  179.             this.length = iprot.readI64();
  180.             this.__isset.length = true;
  181.           } else { 
  182.             TProtocolUtil.skip(iprot, field.type);
  183.           }
  184.           break;
  185.         case 3:
  186.           if (field.type == TType.BOOL) {
  187.             this.isdir = iprot.readBool();
  188.             this.__isset.isdir = true;
  189.           } else { 
  190.             TProtocolUtil.skip(iprot, field.type);
  191.           }
  192.           break;
  193.         case 4:
  194.           if (field.type == TType.I16) {
  195.             this.block_replication = iprot.readI16();
  196.             this.__isset.block_replication = true;
  197.           } else { 
  198.             TProtocolUtil.skip(iprot, field.type);
  199.           }
  200.           break;
  201.         case 5:
  202.           if (field.type == TType.I64) {
  203.             this.blocksize = iprot.readI64();
  204.             this.__isset.blocksize = true;
  205.           } else { 
  206.             TProtocolUtil.skip(iprot, field.type);
  207.           }
  208.           break;
  209.         case 6:
  210.           if (field.type == TType.I64) {
  211.             this.modification_time = iprot.readI64();
  212.             this.__isset.modification_time = true;
  213.           } else { 
  214.             TProtocolUtil.skip(iprot, field.type);
  215.           }
  216.           break;
  217.         case 7:
  218.           if (field.type == TType.STRING) {
  219.             this.permission = iprot.readString();
  220.             this.__isset.permission = true;
  221.           } else { 
  222.             TProtocolUtil.skip(iprot, field.type);
  223.           }
  224.           break;
  225.         case 8:
  226.           if (field.type == TType.STRING) {
  227.             this.owner = iprot.readString();
  228.             this.__isset.owner = true;
  229.           } else { 
  230.             TProtocolUtil.skip(iprot, field.type);
  231.           }
  232.           break;
  233.         case 9:
  234.           if (field.type == TType.STRING) {
  235.             this.group = iprot.readString();
  236.             this.__isset.group = true;
  237.           } else { 
  238.             TProtocolUtil.skip(iprot, field.type);
  239.           }
  240.           break;
  241.         default:
  242.           TProtocolUtil.skip(iprot, field.type);
  243.           break;
  244.       }
  245.       iprot.readFieldEnd();
  246.     }
  247.     iprot.readStructEnd();
  248.   }
  249.   public void write(TProtocol oprot) throws TException {
  250.     TStruct struct = new TStruct("FileStatus");
  251.     oprot.writeStructBegin(struct);
  252.     TField field = new TField();
  253.     if (this.path != null) {
  254.       field.name = "path";
  255.       field.type = TType.STRING;
  256.       field.id = 1;
  257.       oprot.writeFieldBegin(field);
  258.       oprot.writeString(this.path);
  259.       oprot.writeFieldEnd();
  260.     }
  261.     field.name = "length";
  262.     field.type = TType.I64;
  263.     field.id = 2;
  264.     oprot.writeFieldBegin(field);
  265.     oprot.writeI64(this.length);
  266.     oprot.writeFieldEnd();
  267.     field.name = "isdir";
  268.     field.type = TType.BOOL;
  269.     field.id = 3;
  270.     oprot.writeFieldBegin(field);
  271.     oprot.writeBool(this.isdir);
  272.     oprot.writeFieldEnd();
  273.     field.name = "block_replication";
  274.     field.type = TType.I16;
  275.     field.id = 4;
  276.     oprot.writeFieldBegin(field);
  277.     oprot.writeI16(this.block_replication);
  278.     oprot.writeFieldEnd();
  279.     field.name = "blocksize";
  280.     field.type = TType.I64;
  281.     field.id = 5;
  282.     oprot.writeFieldBegin(field);
  283.     oprot.writeI64(this.blocksize);
  284.     oprot.writeFieldEnd();
  285.     field.name = "modification_time";
  286.     field.type = TType.I64;
  287.     field.id = 6;
  288.     oprot.writeFieldBegin(field);
  289.     oprot.writeI64(this.modification_time);
  290.     oprot.writeFieldEnd();
  291.     if (this.permission != null) {
  292.       field.name = "permission";
  293.       field.type = TType.STRING;
  294.       field.id = 7;
  295.       oprot.writeFieldBegin(field);
  296.       oprot.writeString(this.permission);
  297.       oprot.writeFieldEnd();
  298.     }
  299.     if (this.owner != null) {
  300.       field.name = "owner";
  301.       field.type = TType.STRING;
  302.       field.id = 8;
  303.       oprot.writeFieldBegin(field);
  304.       oprot.writeString(this.owner);
  305.       oprot.writeFieldEnd();
  306.     }
  307.     if (this.group != null) {
  308.       field.name = "group";
  309.       field.type = TType.STRING;
  310.       field.id = 9;
  311.       oprot.writeFieldBegin(field);
  312.       oprot.writeString(this.group);
  313.       oprot.writeFieldEnd();
  314.     }
  315.     oprot.writeFieldStop();
  316.     oprot.writeStructEnd();
  317.   }
  318.   public String toString() {
  319.     StringBuilder sb = new StringBuilder("FileStatus(");
  320.     sb.append("path:");
  321.     sb.append(this.path);
  322.     sb.append(",length:");
  323.     sb.append(this.length);
  324.     sb.append(",isdir:");
  325.     sb.append(this.isdir);
  326.     sb.append(",block_replication:");
  327.     sb.append(this.block_replication);
  328.     sb.append(",blocksize:");
  329.     sb.append(this.blocksize);
  330.     sb.append(",modification_time:");
  331.     sb.append(this.modification_time);
  332.     sb.append(",permission:");
  333.     sb.append(this.permission);
  334.     sb.append(",owner:");
  335.     sb.append(this.owner);
  336.     sb.append(",group:");
  337.     sb.append(this.group);
  338.     sb.append(")");
  339.     return sb.toString();
  340.   }
  341. }