Examples of mkdirs()


Examples of org.apache.hadoop.hdfs.DFSClient.mkdirs()

      SetAttr3 setAttr3 = request.getObjAttr();
      FsPermission permission = setAttr3.getUpdateFields().contains(
          SetAttrField.MODE) ? new FsPermission((short) setAttr3.getMode())
          : FsPermission.getDefault().applyUMask(umask);

      if (!dfsClient.mkdirs(fileIdPath, permission, false)) {
        WccData dirWcc = Nfs3Utils.createWccData(
            Nfs3Utils.getWccAttr(preOpDirAttr), dfsClient, dirFileIdPath, iug);
        return new MKDIR3Response(Nfs3Status.NFS3ERR_IO, null, null, dirWcc);
      }
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.mkdirs()

        .numDataNodes(1).build();
    cluster.waitActive();
    DistributedFileSystem fs = (DistributedFileSystem) cluster.getFileSystem();
    OutputStream out = null;
    try {
      fs.mkdirs(new Path("/test-target"));
      out = fs.create(new Path("/test-source/foo")); // don't close
      fs.rename(new Path("/test-source/"), new Path("/test-target/"));

      fs.setSafeMode(SafeModeAction.SAFEMODE_ENTER);
      cluster.getNameNodeRpc().saveNamespace();
View Full Code Here

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

      for (Path srcPath : testPathList) {
        TestRaidDfs.createTestFilePartialLastBlock(fileSys, srcPath,
            1, 8, 8192L);
      }
     
      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");
View Full Code Here

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

          permission, overwrite, bufferSize, replication, blockSize);
      return Response.temporaryRedirect(uri).build();
    }
    case MKDIRS:
    {
      final boolean b = namenode.mkdirs(fullpath, permission.getFsPermission());
      final String js = JsonUtil.toJsonString("boolean", b);
      return Response.ok(js).type(MediaType.APPLICATION_JSON).build();
    }
    case RENAME:
    {
View Full Code Here

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

          permission, overwrite, bufferSize, replication, blockSize);
      return Response.temporaryRedirect(uri).type(MediaType.APPLICATION_OCTET_STREAM).build();
    }
    case MKDIRS:
    {
      final boolean b = np.mkdirs(fullpath, permission.getFsPermission(), true);
      final String js = JsonUtil.toJsonString("boolean", b);
      return Response.ok(js).type(MediaType.APPLICATION_JSON).build();
    }
    case CREATESYMLINK:
    {
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.Warehouse.mkdirs()

    Path tblPath = wh.getDnsPath(new Path(tbl.getSd().getLocation()));
    if (tblPath == null) {
      throw new MetaException("Temp table path not set for " + tbl.getTableName());
    } else {
      if (!wh.isDir(tblPath)) {
        if (!wh.mkdirs(tblPath, true)) {
          throw new MetaException(tblPath
              + " is not a directory or unable to create one");
        }
      }
      // Make sure location string is in proper format
View Full Code Here

Examples of org.apache.pig.PigServer.mkdirs()

    @Test(expected = FrontendException.class)
    public void testBlacklistMkdirWithPigServer() throws Exception {
        ctx.getProperties().setProperty(PigConfiguration.PIG_BLACKLIST, "mkdir");
        PigServer pigServer = new PigServer(ctx);

        pigServer.mkdirs("foo");
    }

    /**
     * This is to test the script fails when used with {@link PigServer}, which
     * uses {@link QueryParser} and not the {@link GruntParser}
View Full Code Here

Examples of org.apache.twill.filesystem.Location.mkdirs()

    if (makeInstall.waitFor() != 0) {
      throw new RuntimeException("Failed to compile SQL Library. Make process exited with exit value " +
                                   makeInstall.exitValue());
    }
    Location target = new LocalLocationFactory().create(System.getProperty("user.dir") + "/tigon-sql/target");
    target.mkdirs();
    target.append("classes").mkdirs();
    ProcessBuilder createTarBuilder = new ProcessBuilder("tar",
                                                         "cvfz", "target/classes/" + Platform.libraryResource(),
                                                         "bin", "lib", "include", "cfg").redirectErrorStream(true);
    createTarBuilder.directory(new File(System.getProperty("user.dir") + "/tigon-sql/"));
View Full Code Here

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

        String output = path.get("output");

        // 初始化purchase
        HdfsDAO hdfs = new HdfsDAO(HDFS, conf);
        hdfs.rmr(input);
        hdfs.mkdirs(input);
        hdfs.copyFile(local_data, input);

        Job job = new Job(conf);
        job.setJarByClass(Purchase.class);
View Full Code Here

Examples of org.exist.util.io.Resource.mkdirs()

       
        try {
            setEventPathPrefix("path");
            if (oldURL == null) {
                if (kind == SVNNodeKind.DIR) {
                    target.mkdirs();
                    dispatchEvent(SVNEventFactory.createSVNEvent(target, SVNNodeKind.DIR, null, SVNRepository.INVALID_REVISION,
                            SVNEventAction.UPDATE_EXTERNAL, null, null, null));
                    if (externalDiff.isExport) {
                        doExport(newURL, target, externalPegRevision, externalRevision, null, true, SVNDepth.INFINITY);
                    } else {
View Full Code Here
TOP
Copyright © 2015 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.