Examples of rename()


Examples of org.apache.hadoop.hdfs.DistributedRaidFileSystem.rename()

      }
     
      raidFs.mkdirs(destHarPath);
      raidFs.mkdirs(new Path(destHarPath, "rename" + RaidNode.HAR_SUFFIX));
     
      raidFs.rename(new Path("/user/dikang/raidtest"),
          new Path("/user/dikang/raidtest1"));
      fail("Expected fail for HAR rename");
    } catch (IOException ie) {
      String message = ie.getMessage();
      assertTrue(message.contains("HAR dir"));

Examples of org.apache.hadoop.hdfs.server.namenode.NameNode.rename()

      final String js = JsonUtil.toJsonString("boolean", b);
      return Response.ok(js).type(MediaType.APPLICATION_JSON).build();
    }
    case RENAME:
    {
      final boolean b = namenode.rename(fullpath, destination.getValue());
      final String js = JsonUtil.toJsonString("boolean", b);
      return Response.ok(js).type(MediaType.APPLICATION_JSON).build();
    }
    case SETREPLICATION:
    {

Examples of org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols.rename()

    }
    case RENAME:
    {
      final EnumSet<Options.Rename> s = renameOptions.getValue();
      if (s.isEmpty()) {
        final boolean b = np.rename(fullpath, destination.getValue());
        final String js = JsonUtil.toJsonString("boolean", b);
        return Response.ok(js).type(MediaType.APPLICATION_JSON).build();
      } else {
        np.rename2(fullpath, destination.getValue(),
            s.toArray(new Options.Rename[s.size()]));

Examples of org.apache.jackrabbit.api.JackrabbitNode.rename()

            Node n = it.nextNode();
            String name = n.getName();
            assertEquals(new String(new char[]{SEQ_BEFORE.charAt(pos)}), name);
            if (pos == RELPOS) {
                JackrabbitNode node = (JackrabbitNode) n;
                node.rename(name.toUpperCase());
                renamedNode = n;
            }
            pos++;
        }

Examples of org.apache.log4j.helpers.FileHelper.rename()

    if (!fileHelper.deleteExisting(to)) {
      this.getAppender().getErrorHandler()
          .error("Unable to delete existing " + to + " for rename");
    }
    final String original = from.toString();
    if (fileHelper.rename(from, to)) {
      LogLog.debug("Renamed " + original + " to " + to);
    } else {
      this.getAppender().getErrorHandler()
          .error("Unable to rename " + original + " to " + to);
    }

Examples of org.apache.oodt.cas.metadata.filenaming.NamingConvention.rename()

                getApplicationContext().getBean(getNamingConventionId());
          if (namingConvention == null) {
             throw new Exception("NamingConvention Id '" + getNamingConventionId()
                   + "' is not defined");
          }
          return namingConvention.rename(product, productMetadata);
       } else {
          return product;
       }
    }

Examples of org.apache.pig.backend.datastorage.ElementDescriptor.rename()

        if (dst.exists()) {
            dst.delete();
        }
       
        src.rename(dst);

    }

    public void copy(String src, String dst, boolean localDst) throws IOException {
        DataStorage dstStorage = dfs;

Examples of org.apache.tools.ant.util.FileUtils.rename()

        FileUtils fu = FileUtils.newFileUtils();
        File temp = fu.createTempFile("symlink", ".tmp", parentDir);
        temp.deleteOnExit();
        try {
            try {
                fu.rename(canfil, temp);
            } catch (IOException e) {
                throw new IOException("Couldn't rename resource when "
                                      + "attempting to delete " + linkfil);
            }

Examples of org.conan.myhadoop.hdfs.HdfsDAO.rename()

        FileOutputFormat.setOutputPath(job, new Path(output));

        job.waitForCompletion(true);

        hdfs.rmr(pr);
        hdfs.rename(output, pr);

    }

}

Examples of org.drools.workbench.screens.drltext.service.DRLTextEditorService.rename()

        drlTextEditorService.copy( makePath( "/ProjectStructureValid/src/main/resources/org/kie/test/rule1.drl" ), "copiedFromRule1.drl", "copied" );
        URL testUrl = this.getClass().getResource( "/ProjectStructureValid/src/main/resources/org/kie/test/copiedFromRule1.drl" );
        assertNotNull( testUrl );

        //Rename
        drlTextEditorService.rename( makePath( "/ProjectStructureValid/src/main/resources/org/kie/test/copiedFromRule1.drl" ), "renamedFromRule1.drl", "renamed" );
        testUrl = this.getClass().getResource( "/ProjectStructureValid/src/main/resources/org/kie/test/renamedFromRule1.drl" );
        assertNotNull( testUrl );

        //Delete
        drlTextEditorService.delete( makePath( "/ProjectStructureValid/src/main/resources/org/kie/test/renamedFromRule1.drl" ), "deleted" );
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.