Due to the nature of both Riak Search and Yokozuna, all Strings must be UTF-8 encoded.
This operation will fail if search is not enabled or the index does not exist.
343344345346347348349350351352353354355356
put0(name, wrap(map)); } private void put0(Fqn name, S3Object obj) throws Exception { Response response = connection.put(getBucket(), key(name), obj); if (trace) { log.trace("put " + name + " obj=" + obj + " response=" + response); } ensureParent(name); if (!response.isOk()) throw new S3Exception("Put failed " + response); }
441442443444445446447448449450451452453454
for (String child : children) { remove(Fqn.fromRelativeElements(name, child)); } } Response response = connection.delete(getBucket(), key(name)); if (trace) { log.trace("delete " + name + " response=" + response); } if (!response.isOk() && !response.isNotFound()) throw new S3Exception("delete failed " + response); parents.remove(name); }
277278279280281282283284285286287288
/** * Returns whether the given node exists. */ public boolean exists(Fqn name) throws Exception { Response response = connection.head(getBucket(), key(name)); if (trace) { log.trace("exists " + name + " response=" + response); } return response.isOk(); }
322323324325326327328329330331332333334335
436437438439440441442443444445446447448449
126127128129130131132133134135136137
{ log.debug("Starting"); try { this.connection = config.getConnection(); Response create = connection.create(getBucket(), config.getLocation()); if (!create.isOk()) throw new S3Exception("Unable to create bucket: " + create); log.info("S3 accessed successfully. Bucket created: " + create); } catch (Exception e) {
147148149150151152153154155156157158
298299300301302303304305306307308309