我在尝试扫描累积表时遇到问题。短环境摘要:
所有相关组件的Localhost单一群集设置:
操作系统:
爪哇:
对于问题
首先,我创建了一个用户,然后创建一个以该用户为所有者的表。我能够使用Java客户端将数据插入表中
后来我想查看我插入的内容,为简单起见,我选择了accumulo shell
当我运行命令scan -t <table>
时,它立即返回,没有给我任何结果。现在有趣的是,平板电脑状态窗口(localhost:9995)显示问题中的表格大约有110K条目。
平板电脑服务器状态屏幕截图:
接下来,我检查了hdfs中平板电脑的大小。这个尺寸对我来说意味着有数据:
1062429 2016-12-15 23:19 /accumulo/tables/c/default_tablet/A000001t.rf
另一个我有相同问题的表有一个更大的rf文件(它有更多的条目):
12433646 2016-12-15 22:23 /accumulo/tables/a/default_tablet/A000000i.rf
接下来我打开了shell中的调试模式:
debug on
然后我再次运行扫描命令。输出:
scan
2016-12-16 00:01:38,113 [rpc.ThriftUtil] TRACE: Opening normal transport
2016-12-16 00:01:38,114 [impl.ThriftTransportPool] TRACE: Creating new connection to connection to localhost:9997
2016-12-16 00:01:38,131 [impl.ThriftTransportPool] TRACE: Returned connection localhost:9997 (120000) ioCount: 7130
2016-12-16 00:01:38,131 [admin.TableOperations] TRACE: tid=14 Checking if table tweets exists...
2016-12-16 00:01:38,132 [admin.TableOperations] TRACE: tid=14 Checked existance of true in 0.000 secs
2016-12-16 00:01:38,132 [impl.ThriftTransportPool] TRACE: Using existing connection to localhost:9997
2016-12-16 00:01:38,146 [impl.ThriftTransportPool] TRACE: Returned connection localhost:9997 (120000) ioCount: 7130
2016-12-16 00:01:38,147 [impl.ThriftTransportPool] TRACE: Using existing connection to localhost:9997
2016-12-16 00:01:38,158 [impl.ThriftTransportPool] TRACE: Returned connection localhost:9997 (120000) ioCount: 7130
2016-12-16 00:01:38,158 [admin.TableOperations] TRACE: tid=14 Checking if table tweets exists...
2016-12-16 00:01:38,159 [admin.TableOperations] TRACE: tid=14 Checked existance of true in 0.000 secs
2016-12-16 00:01:38,159 [impl.ThriftTransportPool] TRACE: Using existing connection to localhost:9997
2016-12-16 00:01:38,168 [impl.ThriftTransportPool] TRACE: Returned connection localhost:9997 (120000) ioCount: 7130
2016-12-16 00:01:38,168 [impl.ThriftTransportPool] TRACE: Using existing connection to localhost:9997
2016-12-16 00:01:38,170 [impl.ThriftTransportPool] TRACE: Returned connection localhost:9997 (120000) ioCount: 130
2016-12-16 00:01:38,170 [shell.Shell] DEBUG: Found no scan iterators to set
2016-12-16 00:01:38,177 [impl.TabletLocatorImpl] TRACE: tid=14 Locating tablet table=c row= skipRow=false retry=false
2016-12-16 00:01:38,178 [impl.TabletLocatorImpl] TRACE: tid=14 Located tablet c<< at localhost:9997 in 0.000 secs
2016-12-16 00:01:38,178 [impl.ThriftTransportPool] TRACE: Using existing connection to localhost:9997
2016-12-16 00:01:38,178 [impl.ThriftScanner] TRACE: tid=14 Starting scan tserver=localhost:9997 tablet=c<< range=(-inf,+inf) ssil=[] ssio={}
2016-12-16 00:01:38,374 [impl.ThriftScanner] TRACE: tid=14 Completely finished scan in 0.195 secs #results=0
2016-12-16 00:01:38,374 [impl.ThriftTransportPool] TRACE: Returned connection localhost:9997 (120000) ioCount: 262
2016-12-16 00:01:38,374 [admin.TableOperations] TRACE: tid=14 Fetching list of tables...
2016-12-16 00:01:38,374 [admin.TableOperations] TRACE: tid=14 Fetched 6 table names in 0.000 secs
2016-12-16 00:01:38,374 [impl.ThriftTransportPool] TRACE: Using existing connection to localhost:9997
2016-12-16 00:01:38,375 [impl.ThriftTransportPool] TRACE: Returned connection localhost:9997 (120000) ioCount: 154
2016-12-16 00:01:38,375 [admin.TableOperations] TRACE: tid=14 Fetching list of namespaces...
2016-12-16 00:01:38,375 [admin.TableOperations] TRACE: tid=14 Fetched 2 namespaces in 0.000 secs
`
对我来说,输出看起来很好,因为scan命令可以找到表和属于该表的平板电脑。但没有显示结果。
任何有关我所做错事或遗失的见解都将不胜感激。
答案 0 :(得分:1)
很可能记录是从执行扫描的Accumulo用户隐藏的。即使他们是表格或Accumulo根的创建者,Accumulo用户也必须拥有与每个条目相关联的适当安全标签,否则他们根本不会看到任何内容。
如果您有摄取的内容或您用于摄取的代码的记录,请检查是否提供了安全字段。如果是,那么您的用户需要获得适当的授权才能使用Accumulo shell读取它们。
setauths -s your,permissions,here -u targetuser