Esempio n. 1
0
 public void shutdown() throws RadosException {
   try {
     ctx.destroy();
   } finally {
     rados.shutdown();
   }
 }
Esempio n. 2
0
 @Override
 public URI create(PnfsId id) throws IOException {
   String imageName = toImageName(id);
   rbd.create(imageName, 0);
   ctx.setXattr(
       toObjName(imageName), CREATION_TIME_ATTR, Longs.toByteArray(System.currentTimeMillis()));
   return toUri(imageName);
 }
Esempio n. 3
0
  public CephFileStore(String poolName, String cluster, String config) throws RadosException {

    rados = new Rados(cluster, config);
    rados.connect();

    ctx = rados.createIoContext(poolName);
    rbd = ctx.createRbd();
    this.poolName = poolName;
  }