我已经安装了HBase 0.94.0,并在我的HDFS 0.20.0之上运行。我正在做作业,必须将列族放在In-Memory
中,我有两个列族No和Subject。
将它们设置为In-Memory
后
new HColumnDescriptor("No").setInMemory(true);
new HColumnDescriptor("Subject").setInMemory(true);
当我检查
localhost:60010
时,表详细信息仍然显示IN_MEMORY => 'false'
为什么会发生这种情况?除了设置.setInMemory(true)
外,我还需要做更多的事情吗? 最佳答案
HTableDescriptor descriptor = new HTableDescriptor("Student92");
HColumnDescriptor col1=new HColumnDescriptor("No".getBytes());
HColumnDescriptor col2=new HColumnDescriptor("Subject".getBytes());
col1.setInMemory(true);
col2.setInMemory(true);
这工作!
关于java - 如何在HBase中设置内存,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/14806978/