在哪里可以看到hbase中的端点日志?

ryoqjall  于 2021-06-09  发布在  Hbase
关注(0)|答案(1)|浏览(497)

我写了一封信 EndPoint 服务器如下:

public class HelloWorldEndPoint extends ServerHelloworld.HelloWorld implements Coprocessor, CoprocessorService {

    private RegionCoprocessorEnvironment env;

    @Override
    public void sendHello(RpcController controller, HelloRequest request,
                          RpcCallback<HelloResponse> done) {
        System.out.println("request HelloRequest:" + request.getAskWord());
        HelloResponse resp = HelloResponse.newBuilder().setRetWord(ByteString.copyFromUtf8("hello world!!!")).build();

        done.run(resp);
    }

    @Override
    public void question(RpcController controller, AskRequest request,
                         RpcCallback<AnsResponse> done) {
        System.out.println("request question:" + request.getAsk());
        AnsResponse resp = AnsResponse.newBuilder().setAns(ByteString.copyFromUtf8("helloworld," + request.getAsk().toStringUtf8())).build();
        done.run(resp);
    }

    @Override
    public Service getService() {
        return this;
    }

    @Override
    public void start(CoprocessorEnvironment env) throws IOException {
        if (env instanceof RegionCoprocessorEnvironment) {
            this.env = (RegionCoprocessorEnvironment) env;
        } else {
            throw new CoprocessorException("Must be loaded on a table region!");
        }
    }
}

问题是我看不到我的日志,例如:

System.out.println("request question:" + request.getAsk());

我不知道在哪里可以看到这个

xcitsw88

xcitsw881#

终结点正在regionserver上运行。通常,regionserver日志在 /var/log/hbase 目录。您应该在sysout logfile中找到该目录中端点的日志。
另外,你还需要 locate the region server (如果您在分布式集群上运行)接收端点客户端请求。

相关问题