(int port)
| 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 { |