HBase源代码调试(1)
来源:互联网 发布:软件测试转正心得体会 编辑:程序博客网 时间:2024/04/30 12:24
搭好环境,终于可以开始调试跟踪代码了.
第一个问题:
VersionInfo.java里面
public static String getVersion() {
return version != null ? version.version() : "Unknown";
}
之类的函数, version总是null, 导致版本不匹配,没怎么走几步就退出了
原来是Annotaion的问题, 解决办法就是在和VersionAnnotation类同级的目录下,
加一个package-info.java的java文件,
定义好VersionAnnotation里面定义的几个String对象
(不能偷懒少定义某一个, 会runtime error的),内容参见前一篇blog
----------------------------------------------------------------------------------------
Eclipse access restriction:Class is not accessible
"Access restriction: Class is not accessible due to restriction on required library"; may be shown while developing Java projects in Eclipse IDE. Error message is self-explanatory, some classes can not be loaded into the project since restriction rules are being imposed on those classes.
How to solve
This error message can be removed by changing a setting inside Eclipse IDE. Open up the dialog box shown below, using any of the following paths.
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings
(Project) Properties -> Java Compiler -> Errors/Warnings
Forbidden reference(access rules) select warning
这种方法会改变eclipse的全局行为,我的解决办法是把原来用的默认jre由eclipse目录下的,该为安装java的目录下的jre
很奇怪,eclipse的jre , 上一个project还好的,
Locate the "Forbidden reference (access rules)" option under "Deprecated and restricted API" section in the dialog box. This option decides how to handle access rules defined inside Eclipse. By default it is set to "Error" which causes Eclipse to complain about references to any restricted classes. Choosing any other option (Warning or Ignore) will remove these error messages.
"Warning" or "Ignore" options will only hide the potential issue in the project, by allowing the project to use any classes ignoring predefined access rules. To completely resolve this issue, analyze the project and located the use of restricted classes and take necessary actions (either remove those references or access rules).
------------------------------------------------------------------------------------
调试java代码的时候, byte[]的变量总是显示成数字,如果要显示对应的字符
Window->Preference->Java->Debug->Primitive Display Options->Check some of them
- HBase源代码调试(1)
- HBase源代码调试(2)
- HBase源代码调试(3)
- HBase源代码调试(4)
- HBase源代码调试(5)
- hbase eclipse调试源代码
- HBase源代码调试(6)-HRegion的启动
- HBase源代码分析1 - Row Lock
- hbase 源代码解析(1) Connection
- Hbase源代码阅读历程
- HBase源代码自编译
- HBase 0.99 源代码分析 - Master启动过程(1)
- 11.2.1 源代码调试(1)
- 11.2.1 源代码调试(2)
- 产品工程源代码调试之关注点1
- 本地调试HBase源码
- eclipse调试hbase,mapreduce
- hbase 远程调试问题
- 直接删除数据文件后无法进入系统的解决方案
- 关于随机数_5
- Config log4j in standalone app
- 353. Penny wise, pound foolish. 贪小便宜吃大亏
- java里面的Annotation的使用
- HBase源代码调试(1)
- Mac 系统常用快捷键
- 第五篇 对话框控件的使用
- Python3 批量转换文件编码 Encoding
- JAVA中的两种典型排序,选择和冒泡
- 谨以这篇文章作为我编程道路的目标,规范和准则!
- ctypes 加载的so库中函数参数的字符串传递问题(str与bytes转换)
- Android之Handler用法总结
- java分页算法