Exemple #1
0
 public void shutdown() throws RadosException {
   try {
     ctx.destroy();
   } finally {
     rados.shutdown();
   }
 }
Exemple #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);
 }
Exemple #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;
  }