/** @return the absolute path. */ public final String[] getAbsolutePaths() { return getValue().split(","); } }
cp.concat(fullpath, concatSrcs.getAbsolutePaths()); return Response.ok().build();
public ConcatSourcesParam(Path[] paths) { this(paths2String(paths)); }
@Test public void testConcatSourcesParam() { final String[] strings = {"/", "/foo", "/bar"}; for(int n = 0; n < strings.length; n++) { final String[] sub = new String[n]; final Path[] paths = new Path[n]; for(int i = 0; i < paths.length; i++) { paths[i] = new Path(sub[i] = strings[i]); } final String expected = StringUtils.join(",", Arrays.asList(sub)); final ConcatSourcesParam computed = new ConcatSourcesParam(paths); Assert.assertEquals(expected, computed.getValue()); } }
@Override public void concat(final Path trg, final Path [] srcs) throws IOException { statistics.incrementWriteOps(1); final HttpOpParam.Op op = PostOpParam.Op.CONCAT; new FsPathRunner(op, trg, new ConcatSourcesParam(srcs)).run(); }
@Override public void concat(final Path trg, final Path [] srcs) throws IOException { statistics.incrementWriteOps(1); final HttpOpParam.Op op = PostOpParam.Op.CONCAT; new FsPathRunner(op, trg, new ConcatSourcesParam(srcs)).run(); }
/** @return the absolute path. */ public final String[] getAbsolutePaths() { final String[] paths = getValue().split(","); return paths; } }
@Override public void concat(final Path trg, final Path [] srcs) throws IOException { statistics.incrementWriteOps(1); storageStatistics.incrementOpCounter(OpType.CONCAT); final HttpOpParam.Op op = PostOpParam.Op.CONCAT; new FsPathRunner(op, trg, new ConcatSourcesParam(srcs)).run(); }
np.concat(fullpath, concatSrcs.getAbsolutePaths()); return Response.ok().build();
public ConcatSourcesParam(Path[] paths) { this(paths2String(paths)); }
/** @return the absolute path. */ public final String[] getAbsolutePaths() { final String[] paths = getValue().split(","); return paths; } }
np.concat(fullpath, concatSrcs.getAbsolutePaths()); return Response.ok().build();
public ConcatSourcesParam(Path[] paths) { this(paths2String(paths)); }