Feb 01, 2017; 5:21pm

Unable to connect to HBase using Phoenix JDBC Driver

9 posts
Hi All,
 
I am trying to connect to HBase using Phoenix JDBC Driver and getting below error:
This is simple implementation of JDBC connection manager. 
 
=============================================================
Caused by: java.lang.IncompatibleClassChangeError: Class org.apache.hadoop.hbase.protobuf.generated.ClusterIdProtos$ClusterId$Builder does not implement the requested interface org.apache.hadoop.hbase.shaded.com.google.protobuf.Message$Builder
        at org.apache.hadoop.hbase.protobuf.ProtobufUtil.mergeFrom(ProtobufUtil.java:3154)
        at org.apache.hadoop.hbase.ClusterId.parseFrom(ClusterId.java:69)
        at org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:75)
        at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:105)
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.retrieveClusterId(ConnectionManager.java:879)
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.<init>(ConnectionManager.java:635)
=============================================================
 
Based on my research it seems, I need to use some shaded package of phoenix-client. I am not able to figure it out.
 
Regards,
Dhaval Modi
[hidden email]
Reply | Threaded | More 
Feb 01, 2017; 5:26pm

Re: Unable to connect to HBase using Phoenix JDBC Driver

9 posts
Apologies, I missed important details.
 
Phoenix version: 4.9.0-HBase-1.1
HBase Version: 1.1.2

Regards,
Dhaval Modi
[hidden email]
On 1 February 2017 at 14:51, Dhaval Modi <[hidden email]> wrote:

Hi All,
 
I am trying to connect to HBase using Phoenix JDBC Driver and getting below error:
This is simple implementation of JDBC connection manager. 
 
=============================================================
Caused by: java.lang.IncompatibleClassChangeError: Class org.apache.hadoop.hbase.protobuf.generated.ClusterIdProtos$ClusterId$Builder does not implement the requested interface org.apache.hadoop.hbase.shaded.com.google.protobuf.Message$Builder
        at org.apache.hadoop.hbase.protobuf.ProtobufUtil.mergeFrom(ProtobufUtil.java:3154)
        at org.apache.hadoop.hbase.ClusterId.parseFrom(ClusterId.java:69)
        at org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:75)
        at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:105)
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.retrieveClusterId(ConnectionManager.java:879)
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.<init>(ConnectionManager.java:635)
=============================================================
 
Based on my research it seems, I need to use some shaded package of phoenix-client. I am not able to figure it out.
 
Regards,
Dhaval Modi
[hidden email]
Reply | Threaded | More 
Feb 01, 2017; 11:37pm

Re: Unable to connect to HBase using Phoenix JDBC Driver

2 posts
Hi Dhaval,

 
Have you added HBase-protocol jar in your dependencies?
This error shows that you have either the incompatible version of HBase-protocol jar or you are missing it( might be missed out from the classpath).
Try to include the proper version(for this case 1.1.2) of the jar or set this jar as HADOOP_CLASSPATH and see if it works.
 
Regards,
Kumar Anshuman
 
Reply | Threaded | More 
Feb 01, 2017; 11:49pm

Re: Unable to connect to HBase using Phoenix JDBC Driver

9 posts
Thanks Anshuman. It was really helpful. 
 
I added HBase-protocol jar in dependency and it got resolved.
 
But now I am getting different error:
 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Caused by: java.lang.IllegalArgumentException: Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService!
        at org.apache.hadoop.hbase.util.Methods.call(Methods.java:45)
        at org.apache.hadoop.hbase.protobuf.ProtobufUtil.newServiceStub(ProtobufUtil.java:1675)
        at org.apache.hadoop.hbase.client.HTable$16.call(HTable.java:1750)
        ... 4 more
Caused by: java.lang.NoSuchMethodException: org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.newStub(org.apache.hadoop.hbase.shaded.com.google.protobuf.RpcChannel)
        at java.lang.Class.getMethod(Class.java:1786)
        at org.apache.hadoop.hbase.util.Methods.call(Methods.java:38)
        ... 6 more
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 

Regards,
Dhaval Modi
[hidden email]
On 1 February 2017 at 21:07, Kumar Anshuman <[hidden email]> wrote:

Hi Dhaval,

 
Have you added HBase-protocol jar in your dependencies?
This error shows that you have either the incompatible version of HBase-protocol jar or you are missing it( might be missed out from the classpath).
Try to include the proper version(for this case 1.1.2) of the jar or set this jar as HADOOP_CLASSPATH and see if it works.
 
Regards,
Kumar Anshuman
 
Reply | Threaded | More 
Feb 02, 2017; 1:56am

Re: Unable to connect to HBase using Phoenix JDBC Driver

2 posts
Hi Dhaval,

This error seems to be due to HBase and Phoenix jar version's mismatch or due to missing of dependency for HBase-protocol-{version}.jar or HBase-protobuff-{version}.jar, you will have to check the proper version of the HBase jars and Phoenix jars used, Please check the versions and validate the different alternatives suggested and try again and inform me if it works or not.
 
Regards,
Kumar Anshuman

On Wed, Feb 1, 2017 at 9:41 PM, Kumar Anshuman <[hidden email]> wrote:

Hi again Dhaval,

This error seems to be due to HBase and Phoenix jar version's mismatch or due to missing of dependency for HBase-protocol-{version}.jar or HBase-protobuff-{version}.jar, you will have to check the proper version of the HBase jars and Phoenix jars used, Please check the versions and validate the different alternatives suggested and try again and inform me if it works or not.
 
Regards,
Kumar Anshuman

On Wed, Feb 1, 2017 at 9:19 PM, Dhaval Modi <[hidden email]> wrote:

Thanks Anshuman. It was really helpful. 
 
I added HBase-protocol jar in dependency and it got resolved.
 
But now I am getting different error:
 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Caused by: java.lang.IllegalArgumentException: Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService!
        at org.apache.hadoop.hbase.util.Methods.call(Methods.java:45)
        at org.apache.hadoop.hbase.protobuf.ProtobufUtil.newServiceStub(ProtobufUtil.java:1675)
        at org.apache.hadoop.hbase.client.HTable$16.call(HTable.java:1750)
        ... 4 more
Caused by: java.lang.NoSuchMethodException: org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.newStub(org.apache.hadoop.hbase.shaded.com.google.protobuf.RpcChannel)
        at java.lang.Class.getMethod(Class.java:1786)
        at org.apache.hadoop.hbase.util.Methods.call(Methods.java:38)
        ... 6 more
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 

Regards,
Dhaval Modi
[hidden email]

On 1 February 2017 at 21:07, Kumar Anshuman <[hidden email]> wrote:

Hi Dhaval,

 
Have you added HBase-protocol jar in your dependencies?
This error shows that you have either the incompatible version of HBase-protocol jar or you are missing it( might be missed out from the classpath).
Try to include the proper version(for this case 1.1.2) of the jar or set this jar as HADOOP_CLASSPATH and see if it works.
 
Regards,
Kumar Anshuman
 
Reply | Threaded | More 
Feb 02, 2017; 2:08am

Re: Unable to connect to HBase using Phoenix JDBC Driver

524 posts
Sounds like you're using the wrong jar on the server side. Or perhaps you're using a vendor distribution (in which case you'll need to use their supported Phoenix version). Please review the installation instructions as everything you need is in the one single jar.
Thanks,
James

On Wed, Feb 1, 2017 at 9:56 AM Kumar Anshuman <[hidden email]> wrote:
Hi Dhaval,

This error seems to be due to HBase and Phoenix jar version's mismatch or due to missing of dependency for HBase-protocol-{version}.jar or HBase-protobuff-{version}.jar, you will have to check the proper version of the HBase jars and Phoenix jars used, Please check the versions and validate the different alternatives suggested and try again and inform me if it works or not.
 
Regards,
Kumar Anshuman

On Wed, Feb 1, 2017 at 9:41 PM, Kumar Anshuman <[hidden email]> wrote:

Hi again Dhaval,

This error seems to be due to HBase and Phoenix jar version's mismatch or due to missing of dependency for HBase-protocol-{version}.jar or HBase-protobuff-{version}.jar, you will have to check the proper version of the HBase jars and Phoenix jars used, Please check the versions and validate the different alternatives suggested and try again and inform me if it works or not.
 
Regards,
Kumar Anshuman

On Wed, Feb 1, 2017 at 9:19 PM, Dhaval Modi <[hidden email]> wrote:

Thanks Anshuman. It was really helpful. 
 
I added HBase-protocol jar in dependency and it got resolved.
 
But now I am getting different error:
 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Caused by: java.lang.IllegalArgumentException: Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService!
        at org.apache.hadoop.hbase.util.Methods.call(Methods.java:45)
        at org.apache.hadoop.hbase.protobuf.ProtobufUtil.newServiceStub(ProtobufUtil.java:1675)
        at org.apache.hadoop.hbase.client.HTable$16.call(HTable.java:1750)
        ... 4 more
Caused by: java.lang.NoSuchMethodException: org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.newStub(org.apache.hadoop.hbase.shaded.com.google.protobuf.RpcChannel)
        at java.lang.Class.getMethod(Class.java:1786)
        at org.apache.hadoop.hbase.util.Methods.call(Methods.java:38)
        ... 6 more
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 

Regards,
Dhaval Modi
[hidden email]

On 1 February 2017 at 21:07, Kumar Anshuman <[hidden email]> wrote:

Hi Dhaval,

 
Have you added HBase-protocol jar in your dependencies?
This error shows that you have either the incompatible version of HBase-protocol jar or you are missing it( might be missed out from the classpath).
Try to include the proper version(for this case 1.1.2) of the jar or set this jar as HADOOP_CLASSPATH and see if it works.
 
Regards,
Kumar Anshuman
 
Reply | Threaded | More 
Feb 02, 2017; 5:58pm

Re: Unable to connect to HBase using Phoenix JDBC Driver

9 posts
Hi Anshuman & James,
 
Thanks for your input. 
 
This issue is resolved. The main reason was the use of HBase-shaded-client as forced dependency. 
I removed it and issue got resolved. 
 

Regards,
Dhaval Modi
[hidden email]
On 1 February 2017 at 23:38, James Taylor <[hidden email]> wrote:

Sounds like you're using the wrong jar on the server side. Or perhaps you're using a vendor distribution (in which case you'll need to use their supported Phoenix version). Please review the installation instructions as everything you need is in the one single jar.
Thanks,
James

On Wed, Feb 1, 2017 at 9:56 AM Kumar Anshuman <[hidden email]> wrote:
Hi Dhaval,

This error seems to be due to HBase and Phoenix jar version's mismatch or due to missing of dependency for HBase-protocol-{version}.jar or HBase-protobuff-{version}.jar, you will have to check the proper version of the HBase jars and Phoenix jars used, Please check the versions and validate the different alternatives suggested and try again and inform me if it works or not.
 
Regards,
Kumar Anshuman

On Wed, Feb 1, 2017 at 9:41 PM, Kumar Anshuman <[hidden email]> wrote:

Hi again Dhaval,

This error seems to be due to HBase and Phoenix jar version's mismatch or due to missing of dependency for HBase-protocol-{version}.jar or HBase-protobuff-{version}.jar, you will have to check the proper version of the HBase jars and Phoenix jars used, Please check the versions and validate the different alternatives suggested and try again and inform me if it works or not.
 
Regards,
Kumar Anshuman

On Wed, Feb 1, 2017 at 9:19 PM, Dhaval Modi <[hidden email]> wrote:

Thanks Anshuman. It was really helpful. 
 
I added HBase-protocol jar in dependency and it got resolved.
 
But now I am getting different error:
 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Caused by: java.lang.IllegalArgumentException: Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService!
        at org.apache.hadoop.hbase.util.Methods.call(Methods.java:45)
        at org.apache.hadoop.hbase.protobuf.ProtobufUtil.newServiceStub(ProtobufUtil.java:1675)
        at org.apache.hadoop.hbase.client.HTable$16.call(HTable.java:1750)
        ... 4 more
Caused by: java.lang.NoSuchMethodException: org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.newStub(org.apache.hadoop.hbase.shaded.com.google.protobuf.RpcChannel)
        at java.lang.Class.getMethod(Class.java:1786)
        at org.apache.hadoop.hbase.util.Methods.call(Methods.java:38)
        ... 6 more
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 

Regards,
Dhaval Modi
[hidden email]

On 1 February 2017 at 21:07, Kumar Anshuman <[hidden email]> wrote:

Hi Dhaval,

 
Have you added HBase-protocol jar in your dependencies?
This error shows that you have either the incompatible version of HBase-protocol jar or you are missing it( might be missed out from the classpath).
Try to include the proper version(for this case 1.1.2) of the jar or set this jar as HADOOP_CLASSPATH and see if it works.
 
Regards,
Kumar Anshuman
 
Reply | Threaded | More 
Feb 10, 2017; 3:07am

Re: Unable to connect to HBase using Phoenix JDBC Driver

2 posts
This post has NOT been accepted by the mailing list yet.
Hi Anshuman, James & Dhaval, 
I am facing the same issue on HDP 2.3 with HBase version 1.1.1.2.3 and Phoenix version 4.4.0. I have been struggling to successfully run a MapReduce job that dumps its data into Phoenix. I have already HBase-shaded-client jar, but it doesn't exist on my disk. 
The MapReduce job that I am running comes bundled with Phoenix (its CSVBulkLoader class). This job is running perfectly fine on my dev cluster which consists of the same stack. I have tried to include hbase-protocol into my application classpath but the error doesn't go away. 
Please help me as I have been stuck on this issue for long. Thanks for the help :)
Reply | Threaded | More 
Feb 10, 2017; 3:11am

Re: Unable to connect to HBase using Phoenix JDBC Driver

2 posts
This post has NOT been accepted by the mailing list yet.
The error trace is as follows: 
Error: java.lang.RuntimeException: java.sql.SQLException: ERROR 2006 (INT08): Incompatible jars detected between client and server. Ensure that phoenix.jar is put on the classpath of HBase in every region server: Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService! 
        at org.apache.phoenix.mapreduce.CsvToKeyValueMapper.setup(CsvToKeyValueMapper.java:121) 
        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143) 
        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787) 
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341) 
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168) 
        at java.security.AccessController.doPrivileged(Native Method) 
        at javax.security.auth.Subject.doAs(Subject.java:422) 
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) 
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162) 
Caused by: java.sql.SQLException: ERROR 2006 (INT08): Incompatible jars detected between client and server. Ensure that phoenix.jar is put on the classpath of HBase in every region server: Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService! 
        at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:386) 
        at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145) 
        at org.apache.phoenix.query.ConnectionQueryServicesImpl.checkClientServerCompatibility(ConnectionQueryServicesImpl.java:987) 
        at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:861) 
        at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1175) 
        at org.apache.phoenix.query.DelegateConnectionQueryServices.createTable(DelegateConnectionQueryServices.java:112) 
        at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1907) 
        at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:745) 
        at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:186) 
        at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:305) 
        at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:297) 
        at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) 
        at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:295) 
        at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1244) 
        at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1851) 
        at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1820) 
        at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77) 
        at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1820) 
        at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:180) 
        at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:132) 
        at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:151) 
        at java.sql.DriverManager.getConnection(DriverManager.java:664) 
        at java.sql.DriverManager.getConnection(DriverManager.java:208) 
        at org.apache.phoenix.util.QueryUtil.getConnection(QueryUtil.java:299) 
        at org.apache.phoenix.mapreduce.CsvToKeyValueMapper.setup(CsvToKeyValueMapper.java:119) 
        ... 8 more 
Caused by: java.lang.IllegalArgumentException: Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService! 
        at org.apache.hadoop.hbase.util.Methods.call(Methods.java:45) 
        at org.apache.hadoop.hbase.protobuf.ProtobufUtil.newServiceStub(ProtobufUtil.java:1669) 
        at org.apache.hadoop.hbase.client.HTable$16.call(HTable.java:1750) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
        at java.lang.Thread.run(Thread.java:745) 
Caused by: java.lang.NoSuchMethodException: org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.newStub(com.google.protobuf.RpcChannel) 
        at java.lang.Class.getMethod(Class.java:1786) 
        at org.apache.hadoop.hbase.util.Methods.call(Methods.java:38) 
        ... 6 more
« Return to Apache Phoenix User List  |  1168 views

Unable to connect to HBase using Phoenix JDBC Driver的更多相关文章

  1. java.lang.UnsupportedClassVersionError: com/mysql/cj/jdbc/Driver : Unsupported major.minor version 52.0 (unable to load class [com.mysql.cj.jdbc.Driver])

    原因: com/mysql/cj/jdbc/Driver是6.0版本的驱动,兼容JDK8环境,不兼容JDK7环境,在基于jdk7的tomcat中编译运行会出错,在基于jdk8的tomcat中编译运行则 ...

  2. How to use DBVisualizer to connect to Hbase using Apache Phoenix

    How to use DBVisualizer to connect to Hbase using Apache Phoenix Article DB Visualizer is a popular ...

  3. HBase单机安装及Phoenix JDBC连接

    HBase是建立在Hadoop文件系统之上的分布式面向列的数据库,它是横向扩展的.它利用了Hadoop的文件系统(HDFS)提供的容错能力. HBase提供对数据的随机实时读/写访问,可以直接HBas ...

  4. Hbase与Phoenix整合

    目录 一.简介 二.安装 三.Phoenix Shell操作 SCHEMA操作 1.创建schema 2.使用schema 3.删除schema 表操作 1.显示所有表 2.创建表 3.表数据的增删改 ...

  5. Apache Phoenix JDBC 驱动和Spring JDBCTemplate的集成

    介绍:Phoenix查询引擎会将SQL查询转换为一个或多个HBase scan,并编排运行以生成标准的JDBC结果集. 直接使用HBase API.协同处理器与自己定义过滤器.对于简单查询来说,其性能 ...

  6. dbeaver can't connect HBase1.2 using phoenix driver #1863

    1 第一个问题 Unexpected version format: 10.0.2 Unexpected version format: 10.0.2 Unexpected version forma ...

  7. 【spring cloud】spring cloud2.X spring boot2.0.4调用feign配置Hystrix Dashboard 和 集成Turbine 【解决:Hystrix仪表盘Unable to connect to Command Metric Stream】【解决:Hystrix仪表盘Loading...】

    环境: <java.version>1.8</java.version><spring-boot.version>2.0.4.RELEASE</spring- ...

  8. Phoneix(二)HBase集成Phoenix安装

    一.软件下载 1.访问:http://phoenix.apache.org/ 2.点击: 3.进入以下内容:点击 4.跳转到 5.跳转到 6.点击安装包,进入 点击进行下载: 二.安装 phoneni ...

  9. telnet报“Unable to connect to remote host:Connection refused”错误

    Linux下面telnet ip 端口号 报错误"Unable to connect to remote host:Connection refused"的时候,大部分是目标机的端 ...

随机推荐

  1. C# Net 去除图片白边

    代码根据别人的进行改写,效果更好 直接拷贝使用 名称空间: using System.Drawing; 代码: /// <summary> /// 裁剪图片(去掉百边) /// </ ...

  2. 用 np.logspace() 创建等比数列

    np.logspace( start, stop, num=50, endpoint=True, base=10.0, dtype=None, axis=0, ) Docstring: Return ...

  3. system.exit(int status)中status值不同时的区别

    status为0时为正常退出程序,也就是结束当前正在运行中的java虚拟机. status为非0的其他整数(包括负数,一般是1或者-1),表示非正常退出当前程序. 可以明确的是,无论status是什么 ...

  4. Nginx下HTML页面POST请求静态JSON数据返回405状态

    在浏览器访问HTML页面,发现一些静态JSON数据没有显示,F12查看,如下图所示: 可以看到请求方式为POST 将请求链接复制在浏览器地址栏访问,可以正常请求到数据 F12查看,可以看到请求方式为G ...

  5. 第08节-开源蓝牙协议栈BTStack数据处理

    本篇博客根据韦东山的视频整理所得. 在上篇博客,通过阅读BTStack的源码,大体了解了其框架,对于任何一个BTStack的应用程序都有一个main函数,这个main函数是统一的.这个main函数做了 ...

  6. 如何修改dedecms专题目录默认名称special

    专题有一个聚合的效果,一般会比普通的文章页更符合用户需求.如果用dedecms建专题的话,默认的目录是special,怎么修改修改dedecms专题目录名称呢,比如将/special/改为/s/这样更 ...

  7. Git 游离态的一次问题解决

    jie@mozq MINGW64 /d/0xcEdu/xcEduService01 ((20ce6a5...)) $ git branch -v * (HEAD detached at 20ce6a5 ...

  8. python递归和内置方法

    递归:函数调用自身 核心:递进的时候能够达到一个结果,问题规模越来越小(不一定要真正的达到):设置一个条件,能够让最后一次函数调用结束 练习: ​ 第一个人的姓名是16岁,后面每个人的年龄都比前一个大 ...

  9. contest3 CF994 div2 ooxxx? oooox? ooooo?

    题意 div2 C (x)(o) 在一个平面上, 给一个水平的正方形和一个\(45^.斜\)的正方形 求是否相交(共点也算), 坐标正负\(100\)以内 div2 D (x)(o) \(A,B\)两 ...

  10. [Python] 递归返回值 为 None 的问题

    递归返回值 为 None 的问题 解决办法: 在递归调用下一个 递归 函数前面,一定要加上 return,否则就会返回 None 如红色 所处的return: def getAllCityUrl(ur ...