MCPcopy Create free account
hub / github.com/Qihoo360/poseidon / StartHttpService

Method StartHttpService

service/hdfsreader/src/main/java/Reader.java:47–57  ·  view source on GitHub ↗
(int port)

Source from the content-addressed store, hash-verified

45 }
46
47 public static void StartHttpService(int port) {
48 try {
49 HttpServer server = HttpServer.create(new InetSocketAddress(port), 0);
50 server.createContext("/read-hdfs", new MyHandler());
51 server.setExecutor(Executors.newCachedThreadPool());
52 server.start();
53 logger.info("StartHttpService start, port: {}", port);
54 } catch (IOException e) {
55 logger.warn("StartHttpService failed");
56 }
57 }
58
59 public static String Decode(String encodedStr) {
60 try {

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected