Package org.apache.hadoop.nfs

Examples of org.apache.hadoop.nfs.NfsTime


      return null;
    }

    long size = fstat.isDir() ? Nfs3FileAttributes.getDirSize(fstat
        .getChildrenNum()) : fstat.getLen();
    return new WccAttr(size, new NfsTime(fstat.getModificationTime()),
        new NfsTime(fstat.getModificationTime()));
  }
View Full Code Here


    }
    this.used = this.size;
    this.rdev = new Specdata3();
    this.fsid = fsid;
    this.fileid = fileid;
    this.mtime = new NfsTime(mtime);
    this.atime = atime != 0 ? new NfsTime(atime) : this.mtime;
    this.ctime = this.mtime;
  }
View Full Code Here

    this.size = other.getSize();
    this.used = other.getUsed();
    this.rdev = new Specdata3();
    this.fsid = other.getFsid();
    this.fileid = other.getFileid();
    this.mtime = new NfsTime(other.getMtime());
    this.atime = new NfsTime(other.getAtime());
    this.ctime = new NfsTime(other.getCtime());
  }
View Full Code Here

import org.junit.Test;

public class TestNfsTime {
  @Test
  public void testConstructor() {
    NfsTime nfstime = new NfsTime(1001);
    Assert.assertEquals(1, nfstime.getSeconds());
    Assert.assertEquals(1000000, nfstime.getNseconds());
  }
View Full Code Here

  }
 
  @Test
  public void testSerializeDeserialize() {
    // Serialize NfsTime
    NfsTime t1 = new NfsTime(1001);
    XDR xdr = new XDR();
    t1.serialize(xdr);
   
    // Deserialize it back
    NfsTime t2 = NfsTime.deserialize(xdr);
   
    // Ensure the NfsTimes are equal
    Assert.assertEquals(t1, t2);
  }
View Full Code Here

import org.junit.Test;

public class TestNfsTime {
  @Test
  public void testConstructor() {
    NfsTime nfstime = new NfsTime(1001);
    Assert.assertEquals(1, nfstime.getSeconds());
    Assert.assertEquals(1000000, nfstime.getNseconds());
  }
View Full Code Here

  }
 
  @Test
  public void testSerializeDeserialize() {
    // Serialize NfsTime
    NfsTime t1 = new NfsTime(1001);
    XDR xdr = new XDR();
    t1.serialize(xdr);
   
    // Deserialize it back
    NfsTime t2 = NfsTime.deserialize(xdr.asReadOnlyWrap());
   
    // Ensure the NfsTimes are equal
    Assert.assertEquals(t1, t2);
  }
View Full Code Here

    }
    this.used = this.size;
    this.rdev = new Specdata3();
    this.fsid = fsid;
    this.fileid = fileid;
    this.mtime = new NfsTime(mtime);
    this.atime = atime != 0 ? new NfsTime(atime) : this.mtime;
    this.ctime = this.mtime;
  }
View Full Code Here

    this.size = other.getSize();
    this.used = other.getUsed();
    this.rdev = new Specdata3();
    this.fsid = other.getFsid();
    this.fileid = other.getFileid();
    this.mtime = new NfsTime(other.getMtime());
    this.atime = new NfsTime(other.getAtime());
    this.ctime = new NfsTime(other.getCtime());
  }
View Full Code Here

      return null;
    }

    long size = fstat.isDir() ? Nfs3FileAttributes.getDirSize(fstat
        .getChildrenNum()) : fstat.getLen();
    return new WccAttr(size, new NfsTime(fstat.getModificationTime()),
        new NfsTime(fstat.getModificationTime()));
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.nfs.NfsTime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.