Package eu.mosaic_cloud.connectors.dfs

Examples of eu.mosaic_cloud.connectors.dfs.IDfsFileConnector


    Assert.assertTrue(this.awaitSuccess(this.connector.makeDirectory(newDirName)));   
  }
 
  private void testWriteFile()
  {
    IDfsFileConnector file = this.awaitFileOutcome
        (this.connector.openFile(path, DfsModes.OVERWRITE_SEQUENTIAL))
    Assert.assertNotNull(file);
   
    Assert.assertTrue(this.awaitSuccess(file.write(line1.getBytes())));
    Assert.assertTrue(this.awaitSuccess(file.write(line2.getBytes())));
    Assert.assertTrue(this.awaitSuccess(file.write(line3.getBytes())));

    Assert.assertTrue(this.awaitSuccess(file.close()))
  }
View Full Code Here


    Assert.assertTrue(this.awaitSuccess(file.close()))
  }
 
  private void testReadFile() {
   
    IDfsFileConnector file = this.awaitFileOutcome
        (this.connector.openFile(path, DfsModes.READ_SEQUENTIAL))
    Assert.assertNotNull(file);
 
    String read1 = new String(this.awaitReadOutcome(file.read(line1.getBytes().length)));
   
    if(!read1.equals(line1)){
      System.out.println("ERROR: Read string is not the same as written was...");
    }
   
    String read2 = new String(this.awaitReadOutcome(file.read(line2.getBytes().length)));
   
    if(!read2.equals(line2)){
      System.out.println("ERROR: Read string is not the same as written was...");
    }
   
    String read3 = new String(this.awaitReadOutcome(file.read(line3.getBytes().length)));
   
    if(!read3.equals(line3)){
      System.out.println("ERROR: Read string is not the same as written was...");
    }

    Assert.assertTrue(this.awaitSuccess(file.close()))
  }
View Full Code Here

    Assert.assertTrue(this.awaitSuccess(this.connector.makeDirectory(newDirName)));   
  }
 
  private void testWriteFile()
  {
    IDfsFileConnector file = this.awaitFileOutcome
        (this.connector.openFile(path, DfsModes.OVERWRITE_SEQUENTIAL))
    Assert.assertNotNull(file);
   
    Assert.assertTrue(this.awaitSuccess(file.write(line1.getBytes())));
    Assert.assertTrue(this.awaitSuccess(file.write(line2.getBytes())));
    Assert.assertTrue(this.awaitSuccess(file.write(line3.getBytes())));

    Assert.assertTrue(this.awaitSuccess(file.close()))
  }
View Full Code Here

    Assert.assertTrue(this.awaitSuccess(file.close()))
  }
 
  private void testReadFile() {
   
    IDfsFileConnector file = this.awaitFileOutcome
        (this.connector.openFile(path, DfsModes.READ_SEQUENTIAL))
    Assert.assertNotNull(file);
 
    String read1 = new String(this.awaitReadOutcome(file.read(line1.getBytes().length)));
   
    if(!read1.equals(line1)){
      System.out.println("ERROR: Read string is not the same as written was...");
    }
   
    String read2 = new String(this.awaitReadOutcome(file.read(line2.getBytes().length)));
   
    if(!read2.equals(line2)){
      System.out.println("ERROR: Read string is not the same as written was...");
    }
   
    String read3 = new String(this.awaitReadOutcome(file.read(line3.getBytes().length)));
   
    if(!read3.equals(line3)){
      System.out.println("ERROR: Read string is not the same as written was...");
    }

    Assert.assertTrue(this.awaitSuccess(file.close()))
  }
View Full Code Here

TOP

Related Classes of eu.mosaic_cloud.connectors.dfs.IDfsFileConnector

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.