- 博客(37)
- 资源 (2)
- 收藏
- 关注
原创 解决maven Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from
解决maven Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from的问题
2022-11-13 20:49:47
2332
原创 DORIS SQL 执行过程
以一条SQL的执行过程为例:select count(*),siteid from table1 where siteid + 1 > 0 group by siteid ;FE 端:MysqlServer => ConnectScheduler => ConnectProcessor handleQuery() { List<StatementBase> stmts = analyze(originStmt); //词法解析,语法解...
2022-01-04 14:49:22
1531
原创 DORIS 编译问题
BE后端 C++编译问题1 brpc编译问题1 undefined reference to `COMP_CTX_new'/usr/bin/ld: t1_enc.c:(.text+0x8a6): undefined reference to `COMP_CTX_new'/usr/bin/ld: t1_enc.c:(.text+0x986): undefined reference to `COMP_CTX_free'/usr/bin/ld: t1_enc.c:(.text+0x9a5): u
2022-01-01 19:37:14
962
原创 C++ reinterpret_cast实例及对数组长度限制的突破
比如某个对象中对字符串数组进行了长度限制,正常在代码中取超出长度限制的时候会报错,如:class Tuple {public:void show(){ data[2]; //这样直接取运行时,会报错}char getChar(int i ){ return *data[i];} private: char * data[0];}但是如果是将某块内存分配好了后,使用reinterpret_cast进行转换,则不会报错。#include <stdio.h
2021-12-28 16:14:55
939
原创 H2 Database
启动参数-tcpAllowOthers -webAllowOthers -webPort 8082 -baseDir /h2db -ifNotExistsJDBC urljdbc:h2:tcp://localhost/h2db一定要加上tcp://localhost这一段 ,否则会报 A file path that is implicitly relative to the current working directory is not allowed in the data..
2021-08-12 17:56:43
390
原创 SPARK
1. Spark-shell 启动选择hive 还是in-memory?在使用spark-shell时,进一步使用dataframe进行sql处理,报错:HiveMetaStoreClient:Failed to connect to the MetaStore Serverspark-shell在默认启动的时候会选择Hive做为SqlContext的默认SessionCatalog,所谓catalog就是spark中对表资源进行管理的标准api集合。如果想使用in-memory的方式 ,可
2021-07-08 14:52:53
894
原创 Presto
基础架构Presto 基础概念https://trino.io/docs/current/overview/concepts.html数据源Connector连接到不同的数据库的组件,通过SPI机制实现。CatalogCatalog 包含schemas和数据引用相关信息,相当于给connector提供数据库元信息Schema一关系型数据库中的Schema一个意思Query Execution ModelStatementSQL语句Query一次查询..
2020-12-31 11:30:25
265
1
原创 网上资源
普罗米修斯结合grafana的主机监控https://github.com/starsliao/Prometheus/tree/master/node_exporter
2020-12-02 15:37:16
99
原创 MyQL 运维及使用
建表脚本create table t_person( FName varchar(20) null, FCity varchar(20) null, FAge int null, FSalary int null);同一个名字,根据薪水排序,然后给出内部序号,with temp as (SELECT FName,FCITY, FSalary,count(*) OVER(partition by FName ORD.
2020-08-26 00:48:30
2523
原创 SPARK YARN cCLUSTER模式及CLINET模式的启动过程
通过submit命令启动后${SPARK_HOME}/bin/spark-submit --master yarn-client --class com.bigdata.WordCount --executor-memory 2G \--num-executors 4 ${SPARK_HOME}/topn-1.0-SNAPSHOT.jar hdfs://spark-master:9000 /temp/inputdir /temp/outputdir实际上启动的是org.apache.spark
2020-08-08 17:47:50
274
原创 HADOOP及YARN常见错误
1 edits_log越积越多的问题HADOOP 2.6.X版本,在非HA模式下,仍然使用的的是secondarynamenode合并editslog的方法 。当secondarynamenode不能正确合并的时候,有可能是secondaryname的堆太小了,如果edtislog的文件太多,就会导致合并失败。可以调整# The maximum amount of heap to use, in MB. Default is 1000.export HADOOP_HEAPSIZE=2
2020-05-09 10:07:09
564
原创 SPARK常见报错
在driver端报:[2020-04-28 10:55:16][main]-[ERROR][org.apache.spark.internal.Logging$class.logError(Logging.scala:91)] Error initializing SparkContext.org.apache.spark.SparkException: Yarn applicatio...
2020-04-28 11:07:03
1293
原创 Grafana小技巧
1 通过mysql数据库得到日期变量,可以根据查询时间得到天表表名SELECT DATE_FORMAT(from_unixtime($__unixEpochTo()), '%Y%m%d') as day1
2020-04-21 16:44:47
618
原创 Nodejs 原生http模块实现的简单服务器 带body解析 静态文件返回
// 这是一个简单的Node HTTP服务器,能处理当前目录的文件// 并能实现两种特殊的URL用于测试// 用HTTP://localhost:8000或http://127.0.0.1:8000连接这个服务器// 首先加载所有需要用到的模块var http = require('http'); // Http服务器APIvar fs = require('fs'); // 用于处...
2020-03-25 20:15:28
1745
原创 vue-cli 4.0 x 关闭eslint
eslint非常烦,数组对象最后竟然都要加逗号,受不了这种语法,直接给关闭了,在vue.config.js:中加入选项 lintOnSave: false就可以了module.exports = { lintOnSave: false}原文ESLint can be configured via .eslintrc or the eslintConfig field ...
2020-03-18 20:27:34
1545
2
原创 Spring Boot与scala结合 case class转化成json的两种方法
两种方法 ,一种是使用json4s库转换成字符串,然后用注解produces = Array("application/json;charset=UTF-8")标明返回的content-type类型,另外一种方法是将case class的属性注解为BeanPropertyimport org.json4s.DefaultFormatsimport org.springframework...
2020-03-17 11:25:45
905
原创 Spark Streaming启动过程及spark.streaming.kafka启动过程
1 StreamingContext中初始化JobScheduler2 JobScheduler里面初始化jobGenerator3 JobGenerator里面初始化RecurringTimer,4 RecurringTimer里面的run函数周期性的触发消息,从eventloop发送class JobGenerator(jobScheduler: JobSchedul...
2020-03-12 16:32:55
356
原创 SPARK 第三方库不可序列化问题Task not serializable Caused by: java.io.NotSerializableException
在RDD 中的map,filter等函数,都会被序列化后,再发送到各个节点去,所以需要map或者filter中的函数可以进行序列化,如果函数中依赖于第三方jar包生成的对象,但是第三方jar中类并不可以序列化,则可以用将第三方的对象进行包装,加上transient注解package bigdata.zetaskechimport java.io.{ObjectInputStre...
2020-03-06 11:53:10
2506
3
原创 python获取本地时区偏移offset的方法
def local_time_offset(t=None): """Return offset of local zone from GMT, either at present or at time t.""" # python2.3 localtime() can't take None if t is None: t = time.time() ...
2019-12-11 12:37:10
1215
原创 Mysql常见技巧及问题
(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server通常有可能是你的字段使用了mysql里面的关键字,比如desc之类,不能用作表的字段...
2019-11-26 12:23:31
140
原创 shell获取区zone offset的方法及获取每天某个分钟或者5分钟的index的方式
##获取时区offset的方法zone=`date '+%H' -d @0`zone_offset=`expr $zone + 0`####function get_fivemin_index(){zone=`date '+%H' -d @0`zone_offset=`expr $zone + 0`ts=$1 #`date +%s`day_ts=$((ts%(1440*60)...
2019-11-22 12:11:08
413
原创 log4j配置及意义 不在控制台输出的问题
## Licensed to the Apache Software Foundation (ASF) under one or more# contributor license agreements. See the NOTICE file distributed with# this work for additional information regarding copyrig...
2019-01-25 12:56:48
1370
原创 sl4j与log4j启动关系 log4j和logback不能同时引入的原因
sl4j的LoggerFactory里面getLogger函数会初始化logger,而这个geLogger函数依赖于org.slf4j.impl.StaticLoggerBinder这个类,但是sl4j在编译的时候,并不会将slf4本身的org.slf4j.impl.StaticLoggerBinder这个类打到jar包,实际上log4j里面有这个包,java的类加载器会加载所有的jar包,所...
2019-01-25 11:35:59
1267
原创 Spark 在windows环境中源码编译遇到的错误
1 首先有可能是各种jar包错误,删除掉maven里面的jar包就好,2 其他:Error:(21, 8) Symbol 'term org.apache.spark.annotation' is missing from the classpath.This symbol is required by ' <none>'.Make sure that term annot...
2018-08-29 16:19:37
9165
原创 对Spray-can 启动http server的理解
对IO(Http) ? Http.Bind(service, interface = “localhost”, port = 8080)的理解 IO(Http)返回一个ActorRef变量,在spray.can.Http中实现, 实际上源代码如下 val manager = manager = system.actorOf( props = Props(new Http
2015-10-05 22:29:22
1733
原创 spray官方文档笔记之spray-can
这篇文章是官方的spray-can的翻译加上一些解读。不正指出望大家指出。spray can的基本功能是启动一个服务器去监听一个指定的端口,然后将接收的tcp请求转换成HttpRequest给你的上层应用去处理。
2015-10-05 00:43:42
3287
原创 Akka Acto官方文档笔记
Akka Acto官方文档笔记Akka Actor 2.9 官方文档笔记:x2.2节An ActorSystem is a heavyweight structure that will allocate 1. . . N Threads, so create one per logical application.ActorSystem 拥有重量级结构,可以分配N个线程,所以在一个逻辑程序中
2015-09-09 22:30:44
635
原创 sbt intellij idea插件 安装及使用 sbt gen-idea命令
安装此插件官方地址,就可以在命令行使用sbt gen-idea命令,然后自动生成IntelliJ Idea的相关文件。 安装方法 在./sbt/0.13目录下面创建目录plugins,然后建立文件build.sbt ,再添加行 addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")在命令行输入sb
2015-09-05 23:08:28
4734
原创 Linux常用命令总结
env 查看环境变量set 查看所有环境变量$RANDOM 代表一个随机数 0~32767PS1 设置命令行一开始的提示信息。whereis 与locate类似
2015-08-30 21:35:42
368
原创 centos 7.0 屏幕超时退出后再登陆黒屏的问题
解决办法: ctrl+alt+ f2 切换到别的终端,再ctrl+alt+f1切换回窗口模式,就可以正常显示了。
2015-08-30 20:23:15
627
原创 centos 7.0 mysql的启动问题
centos 7.0 mysql的启动问题Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’当输入mysql -uroot -p时,提示错误如下 ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/v
2015-08-30 19:36:33
378
原创 弹出框(tooltip)模态modal框的实现原理及Jquery的一个实现实例
弹出框(tooltip)模态modal实现原理 及bootstrap的一个实现实例
2015-04-12 17:07:27
4688
原创 IntelliJ Idea的实用快捷功能
IntelliJ Idea的实用快捷功能IntelliJ Idea是一款非常智能的IDE工具,但是目前国内还不是很流行。对Java,Scala的支持非常到位。在这里先记录一下工作中遇到的一些提高工作效率的小技巧及快捷键等,一是作为自己的笔记,二也可以分享给有需要的同学。IntelliJ Idea建立并运行main函数的方法首先,当你建立一个了个包含main函数的类后,想运行它,有点类似于Eclips
2015-03-21 13:48:09
779
原创 Java正则表达式分组获取字符串
Java正则表达式分组获取字符串这是一段实用的利用Java正则表达式匹配与获取字符串的小函数,参考了网上的Java正则表达式的创立与搜索方法,这里我增加的代码实现的功能是分组匹配并最终获得想要的字符串。[StackEdit][6]修改而来,用它写博客,将会带来全新的体验哦:代码实现代码块代码块语法遵循标准markdown代码,例如:@requires_authorizationimport jav
2015-03-21 12:56:28
3162
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人