kudu java-sample: https://github.com/cloudera/kudu-examples/tree/master/java/java-sample
java -Djava.ext.dirs=./ -DkuduMaster=10.0.2.61:7051 whomm.canel2kudu.App
运行发现错误

1) 这个tls报错的问题 https://kudu.apache.org/docs/security.html
#[29810ms] delaying RPC due to Service unavailable: Master config (10.0.2.61:7051) has no leader. Exceptions received: org.apache.kudu.client.RecoverableException: [Peer master-10.0.2.61:7051] Connection disconnected)
配置新增:
–rpc-encryption=disabled
–rpc_authentication=disabled

2)副本默认3个的错误(因为单机安装)
#org.apache.kudu.client.NonRecoverableException: Not enough live tablet servers to create a table with the requested replication factor 3. 1 tablet servers are alive.
配置新增:
–unlock_unsafe_flags=true
–allow_unsafe_replication_factor=true
–default_num_replicas=1

最终配置:

[work@good ~]$ cat /etc/kudu/conf/tserver.gflagfile
# Do not modify these two lines. If you wish to change these variables,
# modify them in /etc/default/kudu-tserver.
--fromenv=rpc_bind_addresses
--fromenv=log_dir

--fs_wal_dir=/var/lib/kudu/tserver
--fs_data_dirs=/var/lib/kudu/tserver

--rpc-encryption=disabled
--rpc_authentication=disabled

--unlock_unsafe_flags=true
--allow_unsafe_replication_factor=true
--default_num_replicas=1

--rpc_negotiation_timeout_ms=9000
[work@good ~]$ cat /etc/kudu/conf/tserver.gflagfile
# Do not modify these two lines. If you wish to change these variables,
# modify them in /etc/default/kudu-tserver.
--fromenv=rpc_bind_addresses
--fromenv=log_dir

--fs_wal_dir=/var/lib/kudu/tserver
--fs_data_dirs=/var/lib/kudu/tserver

--rpc-encryption=disabled
--rpc_authentication=disabled

--unlock_unsafe_flags=true
--allow_unsafe_replication_factor=true
--default_num_replicas=1

--rpc_negotiation_timeout_ms=9000

这两个文件
/etc/kudu/conf/master.gflagfile
/etc/kudu/conf/tserver.gflagfile
都需要修改,然后重启

[root@good work]# service kudu-master restart
Stopped Kudu Master Server:                                [  OK  ]
Started Kudu Master Server (kudu-master):                  [  OK  ]
[root@good work]# service kudu-tserver restart
Stopped Kudu Tablet Server:                                [  OK  ]
Started Kudu Tablet Server (kudu-tserver):                 [  OK  ]