@Path("/{key-name}") @GET public void get(HttpRequest httpRequest, HttpResponder httpResponder, @PathParam("namespace-id") String namespace, @PathParam("key-name") String name) throws Exception { SecureKeyId secureKeyId = new SecureKeyId(namespace, name); httpResponder.sendByteArray(HttpResponseStatus.OK, secureStore.getSecureData(namespace, name).get(), new DefaultHttpHeaders().set(HttpHeaderNames.CONTENT_TYPE, "text/plain;charset=utf-8")); }
@Path("/{key-name}") @GET public void get(HttpRequest httpRequest, HttpResponder httpResponder, @PathParam("namespace-id") String namespace, @PathParam("key-name") String name) throws Exception { SecureKeyId secureKeyId = new SecureKeyId(namespace, name); httpResponder.sendByteArray(HttpResponseStatus.OK, secureStore.get(namespace, name).get(), new DefaultHttpHeaders().set(HttpHeaderNames.CONTENT_TYPE, "text/plain;charset=utf-8")); }
/** * REST endpoint for the Spark executor nodes to load classes remotely. */ @GET @Path("/.*") public void getClassFile(HttpRequest request, HttpResponder responder) throws Exception { String requestURI = URLDecoder.decode(request.uri(), "UTF-8"); requestURI = requestURI.isEmpty() ? requestURI : requestURI.substring(1); Lock readLock = this.lock.readLock(); readLock.lock(); try { // Use the classloader to find the class file URL resource = jarClassFinder.getResource(requestURI); if (resource != null) { responder.sendByteArray(HttpResponseStatus.OK, Resources.toByteArray(resource), EmptyHttpHeaders.INSTANCE); return; } throw new NotFoundException(requestURI); } finally { readLock.unlock(); } } }
/** * REST endpoint for the Spark executor nodes to load classes remotely. */ @GET @Path("/.*") public void getClassFile(HttpRequest request, HttpResponder responder) throws Exception { String requestURI = URLDecoder.decode(request.uri(), "UTF-8"); requestURI = requestURI.isEmpty() ? requestURI : requestURI.substring(1); Lock readLock = this.lock.readLock(); readLock.lock(); try { // Use the classloader to find the class file URL resource = jarClassFinder.getResource(requestURI); if (resource != null) { responder.sendByteArray(HttpResponseStatus.OK, Resources.toByteArray(resource), EmptyHttpHeaders.INSTANCE); return; } throw new NotFoundException(requestURI); } finally { readLock.unlock(); } } }
/** * REST endpoint for the Spark executor nodes to load classes remotely. */ @GET @Path("/.*") public void getClassFile(HttpRequest request, HttpResponder responder) throws Exception { String requestURI = URLDecoder.decode(request.uri(), "UTF-8"); requestURI = requestURI.isEmpty() ? requestURI : requestURI.substring(1); Lock readLock = this.lock.readLock(); readLock.lock(); try { // Use the classloader to find the class file URL resource = jarClassFinder.getResource(requestURI); if (resource != null) { responder.sendByteArray(HttpResponseStatus.OK, Resources.toByteArray(resource), EmptyHttpHeaders.INSTANCE); return; } throw new NotFoundException(requestURI); } finally { readLock.unlock(); } } }
responder.sendByteArray(HttpResponseStatus.OK, TX_CODEC.encode(transaction), EmptyHttpHeaders.INSTANCE); } catch (IOException e) {
responder.sendByteArray(HttpResponseStatus.OK, TX_CODEC.encode(transaction), EmptyHttpHeaders.INSTANCE); } catch (IOException e) {
responder.sendByteArray(HttpResponseStatus.OK, TX_CODEC.encode(transaction), EmptyHttpHeaders.INSTANCE); } catch (IOException e) {