Package org.apache.tajo.worker.dataserver

Examples of org.apache.tajo.worker.dataserver.HttpDataServer.stop()


    InetSocketAddress addr = server.getBindAddress();
   
    URI uri = URI.create("http://127.0.0.1:"+addr.getPort() + "/data");
    Fetcher fetcher = new Fetcher(uri, new File(OUTPUT_DIR + "data"));
    fetcher.get();
    server.stop();
   
    FileSystem fs = FileSystem.getLocal(new TajoConf());
    FileStatus inStatus = fs.getFileStatus(new Path(INPUT_DIR, "data"));
    FileStatus outStatus = fs.getFileStatus(new Path(OUTPUT_DIR, "data"));
    assertEquals(inStatus.getLen(), outStatus.getLen());
View Full Code Here


   
    URI uri = URI.create("http://127.0.0.1:"+addr.getPort() + "/data");
    ClientSocketChannelFactory channelFactory = RpcChannelFactory.createClientChannelFactory("Fetcher", 1);
    Fetcher fetcher = new Fetcher(uri, new File(OUTPUT_DIR + "data"), channelFactory);
    fetcher.get();
    server.stop();
   
    FileSystem fs = FileSystem.getLocal(new TajoConf());
    FileStatus inStatus = fs.getFileStatus(new Path(INPUT_DIR, "data"));
    FileStatus outStatus = fs.getFileStatus(new Path(OUTPUT_DIR, "data"));
    assertEquals(inStatus.getLen(), outStatus.getLen());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.