图灵架构师第4期学习-百度网盘下载-java文档中心,金山云-文档中心-Java API
Transport Client 1.创建transport client。 // on startup Settings settings = Settings.builder() .put("cluster.name", "myClusterName").build(); //Add transport addresses and do something with the client... TransportClient client = new PreBuiltTransportClient(Settings.EMPTY) .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host1"), 9300)) .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host2"), 9300)); // on shutdown client.close(); 2.添加参数,client.tr....