java - 如何在HBase中设置In-Memory

标签 java hadoop hbase

我已经在我的 HDFS 0.20.0 上启动并运行了 HBase 0.94.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中设置In-Memory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14806978/

相关文章:

java - 如何使用 Spring JMS 支持在运行时创建 JMS 队列?

hadoop - 如何在 web 上使用 php 读取/写入文件到 HDFS

eclipse - sc.TextFile ("") 在 Eclipse 中工作但不在 JAR 中

hadoop - YARN 上的 Spark 中的日志在哪里?

hadoop - 如何从 hive 或 impala 读取 Hbase 当前和以前版本的数据?

hadoop - rowkey 不完全已知时的 HBase 查询

apache - 安全地替换 Zookeeper Quorum 中的坏节点

java - 滑行不下载图像

java - 在服务器上上传包含数十亿条记录的文件并将记录插入数据库

java - jxbrowser 下载时总是弹出空白窗口