Examples of open()


Examples of org.apache.flink.core.fs.FileSystem.open()

    @Override
    public void run() {
      try {
        final FileSystem fs = FileSystem.get(this.split.getPath().toUri());
        this.fdis = fs.open(this.split.getPath());
       
        // check for canceling and close the stream in that case, because no one will obtain it
        if (this.aborted) {
          final FSDataInputStream f = this.fdis;
          this.fdis = null;
View Full Code Here

Examples of org.apache.flink.core.fs.local.LocalFileSystem.open()

        pw.append("line\n");
      }
      pw.close();

      LocalFileSystem lfs = new LocalFileSystem();
      FSDataInputStream fis = lfs.open(pathtotestfile);

      // first, we test under "usual" conditions
      final LineReader lr = new LineReader(fis, 0, testfile.length(), 256);

      byte[] buffer;
View Full Code Here

Examples of org.apache.geronimo.st.v21.ui.wizards.ServerPluginManagerDialog.open()

                // if the server is started, then we can bring up the dialog
                if (isServerRunning()) {
                    GeronimoServerPluginManager pluginManager = new GeronimoServerPluginManager (gs.getServer());
                    ServerPluginManagerWizard wizard = new ServerPluginManagerWizard (pluginManager);
                    ServerPluginManagerDialog dialog = new ServerPluginManagerDialog(Display.getCurrent().getActiveShell(), wizard);
                    dialog.open();
                    if (dialog.getReturnCode() == Dialog.OK) {
                    }
                } else {
                    MessageDialog.openError(Display.getCurrent().getActiveShell(), CommonMessages.errorOpenWizard, CommonMessages.serverNotStarted);
                }
View Full Code Here

Examples of org.apache.geronimo.testsuite.common.selenium.EclipseSelenium.open()

    public boolean displayApplication() {
        boolean success = true;
        try {
            EclipseSelenium selenium = new EclipseSelenium();
            selenium.start();
            selenium.open ("http://localhost:8080/HelloWorld/index.jsp");
            selenium.waitForPageToLoad ("60000");
            success = (selenium.getHtmlSource().indexOf ("Hello World!!") > 0);
            if (success == true) {
                success = (selenium.getHtmlSource().indexOf ("100 USD = 3938.81 INR") > 0);
            }
View Full Code Here

Examples of org.apache.hadoop.fs.FileContext.open()

  @Override
  public Configuration loadConfFile() throws IOException {
    Path confPath = getConfFile();
    FileContext fc = FileContext.getFileContext(confPath.toUri(), conf);
    Configuration jobConf = new Configuration(false);
    jobConf.addResource(fc.open(confPath), confPath.toString());
    return jobConf;
  }
}
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.open()

    }

    Path regioninfo = new Path(regionDir, HRegion.REGIONINFO_FILE);
    FileSystem fs = regioninfo.getFileSystem(getConf());

    FSDataInputStream in = fs.open(regioninfo);
    HRegionInfo hri = new HRegionInfo();
    hri.readFields(in);
    in.close();
    LOG.debug("HRegionInfo read: " + hri.toString());
    hbi.hdfsEntry.hri = hri;
View Full Code Here

Examples of org.apache.hadoop.fs.HarFileSystem.open()

        final String baseName = path.getName();
        final FileStatus status = harFileSystem.getFileStatus(path);
        if (status.isFile()) {
          // read the file:
          final byte[] actualContentSimple = readAllSimple(
              harFileSystem.open(path), true);
         
          final byte[] actualContentBuffer = readAllWithBuffer(
              harFileSystem.open(path), true);
          assertArrayEquals(actualContentSimple, actualContentBuffer);
         
View Full Code Here

Examples of org.apache.hadoop.fs.LocalFileSystem.open()

    if (currentStep > 0) {
      LocalFileSystem local = FileSystem.getLocal(conf);
      local.delete(new Path(getSoftGraphFileName(rootPath, currentStep - 1)),
          true);
      String softGraphFileName = getSoftGraphFileName(rootPath, currentStep);
      softGraphPartsDis = local.open(new Path(softGraphFileName));
    }
    currentStep++;
  }

  @Override
View Full Code Here

Examples of org.apache.hadoop.hbase.fs.HFileSystem.open()

        // Now, use a completely new reader. Switch off hbase checksums in
        // the configuration. In this case, we should not detect
        // any retries within hbase.
        HFileSystem newfs = new HFileSystem(TEST_UTIL.getConfiguration(), false);
        assertEquals(false, newfs.useHBaseChecksum());
        is = newfs.open(path);
        hbr = new FSReaderV2Test(is, algo,
            totalSize, HFile.MAX_FORMAT_VERSION, newfs, path);
        b = hbr.readBlockData(0, -1, -1, pread);
        is.close();
        b.sanityCheck();
View Full Code Here

Examples of org.apache.hadoop.hbase.io.FileLink.open()

    List<Path> files = new ArrayList<Path>();
    files.add(originalPath);
    files.add(archivedPath);

    FileLink link = new FileLink(files);
    FSDataInputStream in = link.open(fs);
    try {
      byte[] data = new byte[8192];
      long size = 0;

      // Read from origin
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.