succ.add(TachyonFileVec.make(serverUri, f, fs).toString()); } catch (Throwable t) { fail.add(f.getName()); Log.err("Failed to loadfile from Tachyon: path = " + f.path + ", error = " + t.getClass().getName() + ", msg = " + t.getMessage());
public static Key make(String serverUri, ClientFileInfo tf, Futures fs) { String fname = tf.getPath(); // Always return absolute path /dir/filename long size = tf.getLength(); Key k = Key.make(PersistTachyon.PREFIX + serverUri + fname); Key k2 = Vec.newKey(k); new Frame(k).delete_and_lock(null); // Insert the top-level FileVec key into the store Vec v = new TachyonFileVec(k2,size); DKV.put(k2, v, fs); Frame fr = new Frame(k,new String[] {fname}, new Vec[] {v}); fr.update(null); fr.unlock(null); return k; } private TachyonFileVec(Key key, long len) {super(key,len,Value.TACHYON);}