private HashSet<String> addNodeSpecialChars() throws Exception { List<String> specialCharSets = Lists.newArrayList("q\\%22afdg\\%22", "a\nbcd", "a\n\rabcd", "012\\efg" ); HashSet<String> set = new HashSet<String>(); NodeBuilder a = nodeStore.getRoot().builder(); for (int i = 0; i < specialCharSets.size(); i++) { SegmentBlob b = (SegmentBlob) nodeStore.createBlob(randomStream(i, 18432)); NodeBuilder n = a.child("cspecial"); n.child(specialCharSets.get(i)).setProperty("x", b); Iterator<String> idIter = blobStore.resolveChunks(b.getBlobId()); set.addAll(Lists.newArrayList(idIter)); } nodeStore.merge(a, EmptyHook.INSTANCE, CommitInfo.EMPTY); return set; }
for (int i = 0; i < numBlobs; i++) { Blob b = store.createBlob(randomStream(i, 18342)); Iterator<String> idIter = blobStore.resolveChunks(b.getContentIdentity()); while (idIter.hasNext()) { String chunk = idIter.next();
private static Map<String, String> dummyData(MemoryBlobStoreNodeStore memNodeStore, String rep2Id, NodeStore store, DataStoreBlobStore setupDataStore, File f) throws IOException, CommitFailedException, DataStoreException { List<String> list = Lists.newArrayList(); Map<String, String> idMapping = Maps.newHashMap(); NodeBuilder a = memNodeStore.getRoot().builder(); for (int i = 0; i < 2; i++) { Blob b = store.createBlob(randomStream(i+100, 18342)); Iterator<String> idIter = setupDataStore.resolveChunks(b.getContentIdentity()); while (idIter.hasNext()) { String id = idIter.next(); list.add(id); idMapping.put(id, "/d" + i); } a.child("d" + i).setProperty("x", b); } memNodeStore.merge(a, EmptyHook.INSTANCE, CommitInfo.EMPTY); writeStrings(list.iterator(), f, false); sort(f); setupDataStore.addMetadataRecord(f, REFERENCES.getNameFromId(rep2Id)); return idMapping; }
Iterator<String> idIter = setupDataStore.resolveChunks(b.getBlobId()); while (idIter.hasNext()) { String chunk = idIter.next();
for (int i = 0; i < numBlobs; i++) { SegmentBlob b = (SegmentBlob) nodeStore.createBlob(randomStream(i, 18342)); Iterator<String> idIter = blobStore.resolveChunks(b.getBlobId()); while (idIter.hasNext()) { String chunk = idIter.next();