Examples of concat()


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

      DFSTestUtil.createFile(fs, path1, 1024, (short) 3, 0);
      DFSTestUtil.createFile(fs, path2, 1024, (short) 3, 0);
      DFSTestUtil.createFile(fs, path3, 1024, (short) 3, 0);
      fs.close();
      fs = getHttpFSFileSystem();
      fs.concat(path1, new Path[]{path2, path3});
      fs.close();
      fs = FileSystem.get(config);
      Assert.assertTrue(fs.exists(path1));
      Assert.assertFalse(fs.exists(path2));
      Assert.assertFalse(fs.exists(path3));
View Full Code Here

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

          // to that file chunk0 and then rename filechunk 0
          if(chunkFiles.length > 1) {
            Path [] restChunkFiles = new Path[chunkFiles.length - 1];
            System.arraycopy(chunkFiles, 1, restChunkFiles, 0,
                chunkFiles.length - 1);
            dstdistfs.concat(chunkFiles[0], restChunkFiles, true);
          }
          //only rename the file, after everything done the whole tmp will be
          //deleted
          renameAfterStitch(dstdistfs, chunkFiles[0], absDstPath);
          dstdistfs.setTimes(absDstPath, modification_time, access_time);
View Full Code Here

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

   
    Path [] srcs = new Path[args.length-2];
    for(int i=2; i<args.length; i++) {
      srcs[i-2] = new Path(args[i]);
    }
    dfs.concat(new Path(args[1]), srcs, !args[0].equals("unrestricted"));
  }

}
View Full Code Here

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

   
    Path [] srcs = new Path[args.length-1];
    for(int i=1; i<args.length; i++) {
      srcs[i-1] = new Path(args[i]);
    }
    dfs.concat(new Path(args[0]), srcs);
  }

}
View Full Code Here

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

    final UserGroupInformation user1 = UserGroupInformation.createUserForTesting(
        "theDoctor", new String[] { "tardis" });
    DistributedFileSystem hdfs =
      (DistributedFileSystem)DFSTestUtil.getFileSystemAs(user1, conf);
    try {
      hdfs.concat(trgPath, files);
      fail("Permission exception expected");
    } catch (IOException ie) {
      System.out.println("Got expected exception for permissions:"
          + ie.getLocalizedMessage());
      // expected
View Full Code Here

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

    long  seed        = 1;

    DFSTestUtil.createFile(dfs, pathConcatTarget, length, replication, seed);
    DFSTestUtil.createFile(dfs, pathConcatFiles[0], length, replication, seed);
    DFSTestUtil.createFile(dfs, pathConcatFiles[1], length, replication, seed);
    dfs.concat(pathConcatTarget, pathConcatFiles);
    // OP_SYMLINK 17
    Path pathSymlink = new Path("/file_symlink");
    fc.createSymlink(pathConcatTarget, pathSymlink, false);
    // OP_GET_DELEGATION_TOKEN 18
    // OP_RENEW_DELEGATION_TOKEN 19
View Full Code Here

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

          fullpath, op.getValue(), -1L, -1L, bufferSize);
      return Response.temporaryRedirect(uri).type(MediaType.APPLICATION_OCTET_STREAM).build();
    }
    case CONCAT:
    {
      namenode.concat(fullpath, concatSrcs.getAbsolutePaths());
      return Response.ok().build();
    }
    default:
      throw new UnsupportedOperationException(op + " is not supported");
    }
View Full Code Here

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

      inodeCount += 3; // test1, file1 and file2 are created
      expectedLastInodeId += 3;
      assertEquals(inodeCount, fsn.dir.getInodeMapSize());
      assertEquals(expectedLastInodeId, fsn.getLastInodeId());
      // Concat the /test1/file1 /test1/file2 into /test1/file2
      nnrpc.concat(file2, new String[] {file1});
      inodeCount--; // file1 and file2 are concatenated to file2
      assertEquals(inodeCount, fsn.dir.getInodeMapSize());
      assertEquals(expectedLastInodeId, fsn.getLastInodeId());
      assertTrue(fs.delete(new Path("/test1"), true));
      inodeCount -= 2; // test1 and file2 is deleted
View Full Code Here

Examples of org.apache.isis.viewer.scimpi.dispatcher.debug.DebugHtmlWriter.concat()

            if (!dir.exists()) {
                dir.mkdirs();
            }
            writer = new PrintWriter(new File(dir, "error_" + errorRef + ".html"));
            final DebugHtmlWriter writer2 = new DebugHtmlWriter(writer, true);
            writer2.concat(debugHtml);
            writer2.close();
            writer.close();
        } catch (final FileNotFoundException e) {
            LOG.error("Failed to archive error page", e);
        }
View Full Code Here

Examples of org.apache.isis.viewer.scimpi.dispatcher.debug.DebugWriter.concat()

            if (!dir.exists()) {
                dir.mkdirs();
            }
            writer = new PrintWriter(new File(dir, "error_" + errorRef + ".html"));
            final DebugWriter writer2 = new DebugWriter(writer, true);
            writer2.concat(debugHtml);
            writer2.close();
            writer.close();
        } catch (final FileNotFoundException e) {
            LOG.error("Failed to archive error page", e);
        }
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.