hue 3.9 hive 查询界面日志无法动态显示

进入hue hive查询界面,随便执行一个查询,无法动态显示日志,F12查看日志刷新请求返回:
{"status": 2, "message": "database is locked"}

后台报错:

[15/Mar/2016 00:07:37 -0700] api ERROR error in
Traceback (most recent call last):
File "/usr/lib/hue/apps/beeswax/src/beeswax/api.py", line 54, in decorator
return view_fn(request, args, **kwargs)
File "/usr/lib/hue/apps/beeswax/src/beeswax/api.py", line 180, in watch_query_refresh_json
query_history.save_state(state)
File "/usr/lib/hue/apps/beeswax/src/beeswax/models.py", line 243, in save_state
self.save()
File "/usr/lib/hue/apps/beeswax/src/beeswax/models.py", line 189, in save
super(QueryHistory, self).save(*args, **kwargs)
File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/base.py", line 545, in save
force_update=force_update, update_fields=update_fields)
File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/base.py", line 573, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/base.py", line 635, in save_table
forced_update)
File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/base.py", line 679, in _do_update
return filtered._update(values) > 0
File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/query.py", line 510, in _update
return query.get_compiler(self.db).execute_sql(None)
File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/sql/compiler.py", line 980, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/sql/compiler.py", line 786, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/utils.py", line 99, in __exit
_
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/sqlite3/base.py", line 452, in execute
return Database.Cursor.execute(self, query, params)
**OperationalError: database is locked
*

但是在历史记录里能查看到这次查询及结果。不知道什么原因,请大神指教

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
hue 查询hive 无法获取日志
2015-04-23 19:00:13,787 WARN [pool-5-thread-1]: thrift.ThriftCLIService (ThriftCLIService.java:FetchResults(538)) - Error fetching results: org.apache.hive.service.cli.HiveSQLException: Expected state FINISHED, but found RUNNING at org.apache.hive.service.cli.operation.Operation.assertState(Operation.java:120) at org.apache.hive.service.cli.operation.SQLOperation.getNextRowSet(SQLOperation.java:288) at org.apache.hive.service.cli.operation.OperationManager.getOperationNextRowSet(OperationManager.java:192) at org.apache.hive.service.cli.session.HiveSessionImpl.fetchResults(HiveSessionImpl.java:471) at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:79) at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:37) at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:64) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628) at org.apache.hadoop.hive.shims.HadoopShimsSecure.doAs(HadoopShimsSecure.java:493) at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:60) at com.sun.proxy.$Proxy14.fetchResults(Unknown Source) at org.apache.hive.service.cli.CLIService.fetchResults(CLIService.java:405) at org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(ThriftCLIService.java:530) at org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1553) at org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1538) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:55) at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:206) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
Hue安装的问题(启动失败)
我的hadoop集群是在centos上安装的,最近测试安装hue.build完成之后,启动hue爆出如下错误: KeyError: "Couldn't get user id for user hue" 参考:https://github.com/cloudera/hue/issues/27 增加了hue用户,再次启动还是报错. Traceback (most recent call last): File "/home/spark/hue/branch-3.9/build/env/bin/hue", line 11, in <module> load_entry_point('desktop', 'console_scripts', 'hue')() File "/home/spark/hue/branch-3.9/desktop/core/src/desktop/manage_entry.py", line 59, in entry execute_from_command_line(sys.argv) File "/home/spark/hue/branch-3.9/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/__init__.py", line 399, in execute_from_command_line utility.execute() File "/home/spark/hue/branch-3.9/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/__init__.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/spark/hue/branch-3.9/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/__init__.py", line 261, in fetch_command commands = get_commands() File "/home/spark/hue/branch-3.9/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/__init__.py", line 107, in get_commands apps = settings.INSTALLED_APPS File "/home/spark/hue/branch-3.9/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/conf/__init__.py", line 54, in __getattr__ self._setup(name) File "/home/spark/hue/branch-3.9/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/conf/__init__.py", line 49, in _setup self._wrapped = Settings(settings_module) File "/home/spark/hue/branch-3.9/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/conf/__init__.py", line 128, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/home/spark/hue/branch-3.9/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/utils/importlib.py", line 40, in import_module __import__(name) File "/home/spark/hue/branch-3.9/desktop/core/src/desktop/settings.py", line 34, in <module> from desktop.lib.python_util import force_dict_to_strings File "/home/spark/hue/branch-3.9/desktop/core/src/desktop/lib/python_util.py", line 23, in <module> from desktop import conf File "/home/spark/hue/branch-3.9/desktop/core/src/desktop/conf.py", line 29, in <module> from desktop.lib.conf import Config, ConfigSection, UnspecifiedConfigSection,\ File "/home/spark/hue/branch-3.9/desktop/core/src/desktop/lib/conf.py", line 72, in <module> import configobj KeyboardInterrupt 请大家帮我看一下这是什么问题?谢谢
CDH5.12.1的hue的load balance红色警报,无法启动
![图片说明](https://img-ask.csdn.net/upload/201711/24/1511511602_248501.png) 查看日志根本没有生成 ![图片说明](https://img-ask.csdn.net/upload/201711/24/1511511626_49258.png) 重新添加服务 也不行 求大神解答!!
通过hue 执行hivesql 报错
我用hue 执行hivesql 的时候系统报错, java.net.SocketTimeoutException:callTimeout=60000, callDuration=68043: row 'log,,00000000000000' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=node4,16020,1476410081203, seqNum=0:5:1", 'org.apache.hadoop.hbase.client.RpcRetryingCaller:callWithRetries:RpcRetryingCaller.java:159', 'org.apache.hadoop.hbase.client.ResultBoundedCompletionService$QueueingFuture:run:ResultBoundedCompletionService.java:64', '*org.apache.hadoop.hbase.exceptions.ConnectionClosingException:Call to node4/192.168.127.1:16020 failed on local exception: org.apache.hadoop.hbase.exceptions.ConnectionClosingException: Connection to node4/192.168.127.1:16020 is closing. Call id=9, waitTime=1:16:11', 'org.apache.hadoop.hbase.ipc.RpcClientImpl:wrapException:RpcClientImpl.java:1239', 'org.apache.hadoop.hbase.ipc.RpcClientImpl:call:RpcClientImpl.java:1210', 'org.apache.hadoop.hbase.ipc.AbstractRpcClient:callBlockingMethod:AbstractRpcClient.java:213', 'org.apache.hadoop.hbase.ipc.AbstractRpcClient$BlockingRpcChannelImplementation:callBlockingMethod:AbstractRpcClient.java:287', 'org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$BlockingStub:scan:ClientProtos.java:32651', 'org.apache.hadoop.hbase.client.ScannerCallable:openScanner:ScannerCallable.java:372', 'org.apache.hadoop.hbase.client.ScannerCallable:call:ScannerCallable.java:199', 'org.apache.hadoop.hbase.client.ScannerCallable:call:ScannerCallable.java:62', 'org.apache.hadoop.hbase.client.RpcRetryingCaller:callWithoutRetries:RpcRetryingCaller.java:200', 'org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC:call:ScannerCallableWithReplicas.java:369', 'org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC:call:ScannerCallableWithReplicas.java:343', 'org.apache.hadoop.hbase.client.RpcRetryingCaller:callWithRetries:RpcRetryingCaller.java:126', '*org.apache.hadoop.hbase.exceptions.ConnectionClosingException:Connection to node4/192.168.127.1:16020 is closing. Call id=9, waitTime=1:3:2', 'org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection:cleanupCalls:RpcClientImpl.java:1037', 'org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection:close:RpcClientImpl.java:844', 'org.apache.hadoop.hbase.ipc.RpcClientImpl$Connection:run:RpcClientImpl.java:572'], statusCode=3), results=None, hasMoreRows=None) 但是我用hive shell 执行 sql 一切都正常
Docker安装Hue,启动Hue报错,报错内容见截图,望高人指点
Docker安装Hue,启动Hue报错,报错内容见截图,望高人指点 启动操作 1、从Docker Hub获取镜像 sudo docker pull gethue/hue:latest 2、运行镜像 docker run -it -p 8888:8888 gethue/hue:latest bash 3、容器内启动HUE ./build/env/bin/supervisor ![图片说明](https://img-ask.csdn.net/upload/201907/12/1562940031_423619.jpg)
如何下载MySQL-devel-5.6.24-1.el6.x86_64 求连接地址
因为缺少mysql-config 不知道如何下载MySQL-devel-5.6.24-1.el6.x86_64 在linux安装hue报的错 * File "setup.py", line 15, in <module> * metadata, options = get_config() * File "/opt/module/hue-3.7.0-cdh5.3.6/desktop/core/ext-py/MySQL-python-1.2.3c1/setup_posix.py", line 43, in get_config * libs = mysql_config("libs_r") * File "/opt/module/hue-3.7.0-cdh5.3.6/desktop/core/ext-py/MySQL-python-1.2.3c1/setup_posix.py", line 24, in mysql_config * raise EnvironmentError("%s not found" % (mysql_config.path,)) * EnvironmentError: mysql_config not found * make[2]: *** [/opt/module/hue-3.7.0-cdh5.3.6/desktop/core/build/MySQL-python-1.2.3c1/egg.stamp] 错误 1 * make[2]: Leaving directory `/opt/module/hue-3.7.0-cdh5.3.6/desktop/core' * make[1]: *** [.recursive-env-install/core] 错误 2 * make[1]: Leaving directory `/opt/module/hue-3.7.0-cdh5.3.6/desktop' * make: *** [desktop] 错误 2 下面是我百度的方法 1. 通过报错信息看出是缺少mysql_config,在/usr/bin/下面应该有的mysql_config文件没有, * 网上的解决方案都是apt-get install libmysqlclient-dev,但是apt-get是Debian、Ubuntu系列的网络安装命令, * yum是Redhat、Centos、Fedora是网络安装命令,接着发现Centos上应该安装mysql-devel * 2. yum install mysql-devel,发现有冲突,报错如下: * 3. 使用 rpm -qa|grep mysql查看mysql的安装情况 * mysql-devel-5.6.24-1.el6_4.x86_64 * mysql-client-5.6.24-1.el6_4.x86_64 * mysql-server-5.6.24-1.el6_4.x86_64 * 4. 使用rpm -e mysql-devel-5.6.24-1.el6_4.x86_64移除已有的安装包 * 5. 再次使用yum install mysql-devel 发现和mysql-server, mysql-client的版本有冲突 * 6. 去网上寻找相同的版本下载http://downloads.skysql.com/archive/index/p/mysql/v/5.5.16,下载64bit的rpm文件,使用rpm -ivh MySQL-devel-5.5.16-1.linux2.6.x86_64.rpm安装 * 7. 安装成功后,去/usr/bin/目录下,发现生成了mysql_config文件,继续pip install mysql-python,顺利完成 提供下载地址 ![图片说明](https://img-ask.csdn.net/upload/201903/08/1552033978_619340.jpg)
CDH中HUE的账号权限问题
Job Submission failed with exception 'org.apache.hadoop.security.AccessControlException(Permission denied: user=mazhiqiang, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x 上面是我使用新建的HUE账号进行复杂查询时的报错(简单查询没问题,比如select * from ...),我已经给这个账号分配: jobsub.access, jobbrowser.access, metastore.access这三个权限,不知道接下来应该怎么解决。
hue安装后修改python环境造成的问题
使用centos虚拟机,hue安装时实在python2.6环境下安装的,安装完成后使用一切正常,因为想使用 python3.6 所以把环境修改成了python3.6 完成之后 hue上面的sqoop定时任务失败 并且不能再hue上面发布oozie的定时任务,把python换成2.6的也不行,这是为啥啊
安装hue过程使用git出现问题
请问再安装hue中,我把需要的所有软件都安装好了,最后在 **git clone https://github.com/cloudera/hue.git 这步出现问题了 ****fatal: 不能为 'hue' 创建工作区目录。: ????****
opencv实现边缘梯度直方图+meanshift实现框选物体跟踪,代码出错,不知道错在哪里?
``` #include<iostream> #include<opencv2/opencv.hpp> #include<opencv2/highgui/highgui.hpp> #include<opencv2/core/core.hpp> #include<opencv2/imgproc/imgproc.hpp> #include<ctype.h> using namespace std; using namespace cv; Mat image; //当前帧图像 Mat imageCopy; //用于拷贝的当前帧图像 Mat rectImage; //子图像 Point beginPoint; //矩形框起点 Point endPoint; //矩形框终点 bool leftButtonDownFlag = false; //左键单击后视频暂停播放的标志位 int frameCount = 0; //帧数统计 int trackCount = 0; //等于1时初始化直方图 void onMouse(int event, int x, int y, int flags, void* ustc); //鼠标回调函数 int main(int argc, char* argv[]) { VideoCapture capture("1.AVI"); //VideoCapture capture(0); int capture_fps = capture.get(CV_CAP_PROP_FPS); //获取视频帧率 int capture_count = capture.get(CV_CAP_PROP_FRAME_COUNT); int capture_width = capture.get(CV_CAP_PROP_FRAME_WIDTH); int capture_height = capture.get(CV_CAP_PROP_FRAME_HEIGHT); cout << "视频帧率:" << capture_fps << endl; cout << "视频帧数:" << capture_count << endl; cout << "视频宽度:" << capture_width << endl; cout << "视频高度:" << capture_height << endl; int pauseTime = 1000 / capture_fps; //两幅画面中间间隔 namedWindow("Video"); setMouseCallback("Video", onMouse);//函数setMousecallback用于鼠标在图上做标记等作用 int hbinNum = 16;//每一维上直方图的个数,如果是一维直方图,就是竖条(bin)的个数 float hranges[] = { 40, 250 };//每一维数值的取值范围数组 const float* phranges = hranges;//const修饰phranges指针,指针phranges的指向可以修改,但是phranges指向的值不可以改;指针phranges指向的是hranges的首地址 bool backprojectMode = false; namedWindow("Video", 0); capture >> image; int rows = image.rows; int cols = image.cols; Mat image1 = image.clone(); Mat dst, edge, gray;//定义canny边缘检测所需的变量 Mat abs_grad_x, abs_grad_y;//定义sobel算子求方向梯度所需的变量 Mat grad_x(rows, cols, CV_8UC1, Scalar::all(0));//定义sobel算子求方向梯度所需的变量 Mat grad_y(rows, cols, CV_8UC1, Scalar::all(0));//定义sobel算子求方向梯度所需的变量 Mat theta(rows, cols, CV_32FC1, Scalar::all(0)); Mat gradient(rows, cols, CV_32FC1, Scalar::all(0));//梯度矩阵 Mat angle(rows, cols, CV_32FC1, Scalar::all(0));//梯度方向角度 Mat mask, hist, histImg = Mat::zeros(image.size(), image.type()), backproj;//初始化histImg存储直方图数据,使其规格与捕获的image相同 Rect trackWindow;//定义一个捕捉矩形窗口 //**********************读取视频******************************** while (true) { if (!leftButtonDownFlag) //鼠标左键按下绘制矩形时,视频暂停播放 { capture >> image;//读取当前帧 frameCount++; //帧数增加,视频向前增加 } if (!image.data || waitKey(pauseTime + 30) == 27) //当当前帧的数据为空或两帧画面的时间间隔不满足规定的数值时,退出播放 { break; } //***************camshiftdemo代码的脉络分析******************** //提取边缘梯度大小与幅值 if (trackCount > 0) { dst.create(image1.size(), image1.type()); dst = Scalar::all(0); cvtColor(image1, gray, COLOR_BGR2GRAY); GaussianBlur(gray, edge, Size(3, 3), 0, 0); Canny(edge, edge, 3, 9, 3);//canny算子获得边缘图 Sobel(gray, grad_x, CV_16S,1, 0, 3, 1, 1);//求X方向的梯度 Sobel(gray, grad_y, CV_16S,0, 1, 3, 1, 1);//求Y方向的梯度 cartToPolar(grad_x, grad_y, gradient, angle);//计算梯度方向与梯度幅值 convertScaleAbs(grad_x, grad_x); convertScaleAbs(grad_y, grad_y); //绘制直方图 if (trackCount == 1) { histImg = Scalar::all(0); Mat roi(angle, Rect(beginPoint, endPoint)), maskroi(mask, Rect(beginPoint, endPoint)); calcHist(&roi, 1, 0, maskroi, hist, 1, &hbinNum, &phranges);//掩膜maskroi是用来确定输入图像的哪些像素被计数;mask也设置ROI, 是要让hue中截取出来放在mask中的 区域大小位置都和hue中一致, 不要改变原来的位置这点很有用。 normalize(hist, hist, 0, 255, CV_MINMAX); trackCount++; trackWindow = Rect(beginPoint, endPoint); } calcBackProject(&angle, 1, 0, hist, backproj, &phranges);//直方图反向投影 backproj &= mask; meanShift(backproj, trackWindow, TermCriteria(CV_TERMCRIT_EPS | CV_TERMCRIT_ITER, 10, 1));//CamshiftDemo //***画出跟踪区域的位置 if (backprojectMode) { cvtColor(backproj, image, CV_GRAY2BGR); } rectangle(image, Point(trackWindow.x, trackWindow.y), Point(trackWindow.x + trackWindow.width, trackWindow.y + trackWindow.height), Scalar(0, 0, 255), 1, CV_AA);//画跟踪矩形框 trackCount++; // writer << image; } imshow("Video", image); } waitKey(0); return 0; } //鼠标回调函数 void onMouse(int event, int x, int y, int flags, void *ustc) { if (event == CV_EVENT_LBUTTONDOWN) { leftButtonDownFlag = true; //标志位 beginPoint = Point(x, y); //设置左键按下点的矩形起点 endPoint = beginPoint; } if (event == CV_EVENT_MOUSEMOVE && leftButtonDownFlag) { imageCopy = image.clone(); endPoint = Point(x, y); if (beginPoint != endPoint) { //在复制的图像上绘制矩形 rectangle(imageCopy, beginPoint, endPoint, Scalar(0, 0, 255), 2); } imshow("Video", imageCopy); } if (event == CV_EVENT_LBUTTONUP) { leftButtonDownFlag = false; Mat subImage = image(Rect(beginPoint, endPoint)); //子图像 rectImage = subImage.clone(); trackCount = 1; //imshow("Sub Image", rectImage); } } ```
oozie配置任务,任务可以执行成功,但是workflow显示的是kill
oozie配置任务,任务可以执行成功,但是workflow显示的是kill,看了一下日志,报错如下: ![图片说明](https://img-ask.csdn.net/upload/201908/08/1565255997_632507.png)![图片说明](https://img-ask.csdn.net/upload/201908/08/1565256009_163062.png) 我看网上说换mysql驱动包,我已经尝试了,发现不是这个问题导致的。 我用的是hue,然后hdp的版本是2.6。
请问HTML5烟花效果,如何修改成不需要单击鼠标就播放的效果?
以下烟花如何修改成不需要点击就可以播放的效果? ``` <!DOCTYPE html> <html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>HTML5鼠标点击放烟花效果-www.codesc.net</title> <style> html,body{height:100%;margin:0;padding:0} ul,li{text-indent:0;text-decoration:none;margin:0;padding:0} img{border:0} body{background-color:#000;color:#999;font:100%/18px helvetica, arial, sans-serif} canvas{cursor:crosshair;display:block;left:0;position:absolute;top:0;z-index:20} </style> </head> <body> <script type="text/javascript" src="http://www.codesc.net/ajaxjs/jquery-1.9.1.min.js"></script> <script type="text/javascript"> $(function(){ var Fireworks = function(){ var self = this; var rand = function(rMi, rMa){return ~~((Math.random()*(rMa-rMi+1))+rMi);} var hitTest = function(x1, y1, w1, h1, x2, y2, w2, h2){return !(x1 + w1 < x2 || x2 + w2 < x1 || y1 + h1 < y2 || y2 + h2 < y1);}; window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}(); self.init = function(){ self.canvas = document.createElement('canvas'); self.canvas.width = self.cw = $(window).innerWidth(); self.canvas.height = self.ch = $(window).innerHeight(); self.particles = []; self.partCount = 150; self.fireworks = []; self.mx = self.cw/2; self.my = self.ch/2; self.currentHue = 30; self.partSpeed = 5; self.partSpeedVariance = 10; self.partWind = 50; self.partFriction = 5; self.partGravity = 1; self.hueMin = 0; self.hueMax = 360; self.fworkSpeed = 4; self.fworkAccel = 10; self.hueVariance = 30; self.flickerDensity = 25; self.showShockwave = true; self.showTarget = false; self.clearAlpha = 25; $(document.body).append(self.canvas); self.ctx = self.canvas.getContext('2d'); self.ctx.lineCap = 'round'; self.ctx.lineJoin = 'round'; self.lineWidth = 1; self.bindEvents(); self.canvasLoop(); self.canvas.onselectstart = function() { return false; }; }; self.createParticles = function(x,y, hue){ var countdown = self.partCount; while(countdown--){ var newParticle = { x: x, y: y, coordLast: [ {x: x, y: y}, {x: x, y: y}, {x: x, y: y} ], angle: rand(0, 360), speed: rand(((self.partSpeed - self.partSpeedVariance) <= 0) ? 1 : self.partSpeed - self.partSpeedVariance, (self.partSpeed + self.partSpeedVariance)), friction: 1 - self.partFriction/100, gravity: self.partGravity/2, hue: rand(hue-self.hueVariance, hue+self.hueVariance), brightness: rand(50, 80), alpha: rand(40,100)/100, decay: rand(10, 50)/1000, wind: (rand(0, self.partWind) - (self.partWind/2))/25, lineWidth: self.lineWidth }; self.particles.push(newParticle); } }; self.updateParticles = function(){ var i = self.particles.length; while(i--){ var p = self.particles[i]; var radians = p.angle * Math.PI / 180; var vx = Math.cos(radians) * p.speed; var vy = Math.sin(radians) * p.speed; p.speed *= p.friction; p.coordLast[2].x = p.coordLast[1].x; p.coordLast[2].y = p.coordLast[1].y; p.coordLast[1].x = p.coordLast[0].x; p.coordLast[1].y = p.coordLast[0].y; p.coordLast[0].x = p.x; p.coordLast[0].y = p.y; p.x += vx; p.y += vy; p.y += p.gravity; p.angle += p.wind; p.alpha -= p.decay; if(!hitTest(0,0,self.cw,self.ch,p.x-p.radius, p.y-p.radius, p.radius*2, p.radius*2) || p.alpha < .05){ self.particles.splice(i, 1); } }; }; self.drawParticles = function(){ var i = self.particles.length; while(i--){ var p = self.particles[i]; var coordRand = (rand(1,3)-1); self.ctx.beginPath(); self.ctx.moveTo(Math.round(p.coordLast[coordRand].x), Math.round(p.coordLast[coordRand].y)); self.ctx.lineTo(Math.round(p.x), Math.round(p.y)); self.ctx.closePath(); self.ctx.strokeStyle = 'hsla('+p.hue+', 100%, '+p.brightness+'%, '+p.alpha+')'; self.ctx.stroke(); if(self.flickerDensity > 0){ var inverseDensity = 50 - self.flickerDensity; if(rand(0, inverseDensity) === inverseDensity){ self.ctx.beginPath(); self.ctx.arc(Math.round(p.x), Math.round(p.y), rand(p.lineWidth,p.lineWidth+3)/2, 0, Math.PI*2, false) self.ctx.closePath(); var randAlpha = rand(50,100)/100; self.ctx.fillStyle = 'hsla('+p.hue+', 100%, '+p.brightness+'%, '+randAlpha+')'; self.ctx.fill(); } } }; }; self.createFireworks = function(startX, startY, targetX, targetY){ var newFirework = { x: startX, y: startY, startX: startX, startY: startY, hitX: false, hitY: false, coordLast: [ {x: startX, y: startY}, {x: startX, y: startY}, {x: startX, y: startY} ], targetX: targetX, targetY: targetY, speed: self.fworkSpeed, angle: Math.atan2(targetY - startY, targetX - startX), shockwaveAngle: Math.atan2(targetY - startY, targetX - startX)+(90*(Math.PI/180)), acceleration: self.fworkAccel/100, hue: self.currentHue, brightness: rand(50, 80), alpha: rand(50,100)/100, lineWidth: self.lineWidth }; self.fireworks.push(newFirework); }; self.updateFireworks = function(){ var i = self.fireworks.length; while(i--){ var f = self.fireworks[i]; self.ctx.lineWidth = f.lineWidth; vx = Math.cos(f.angle) * f.speed, vy = Math.sin(f.angle) * f.speed; f.speed *= 1 + f.acceleration; f.coordLast[2].x = f.coordLast[1].x; f.coordLast[2].y = f.coordLast[1].y; f.coordLast[1].x = f.coordLast[0].x; f.coordLast[1].y = f.coordLast[0].y; f.coordLast[0].x = f.x; f.coordLast[0].y = f.y; if(f.startX >= f.targetX){ if(f.x + vx <= f.targetX){ f.x = f.targetX; f.hitX = true; } else { f.x += vx; } } else { if(f.x + vx >= f.targetX){ f.x = f.targetX; f.hitX = true; } else { f.x += vx; } } if(f.startY >= f.targetY){ if(f.y + vy <= f.targetY){ f.y = f.targetY; f.hitY = true; } else { f.y += vy; } } else { if(f.y + vy >= f.targetY){ f.y = f.targetY; f.hitY = true; } else { f.y += vy; } } if(f.hitX && f.hitY){ self.createParticles(f.targetX, f.targetY, f.hue); self.fireworks.splice(i, 1); } }; }; self.drawFireworks = function(){ var i = self.fireworks.length; self.ctx.globalCompositeOperation = 'lighter'; while(i--){ var f = self.fireworks[i]; self.ctx.lineWidth = f.lineWidth; var coordRand = (rand(1,3)-1); self.ctx.beginPath(); self.ctx.moveTo(Math.round(f.coordLast[coordRand].x), Math.round(f.coordLast[coordRand].y)); self.ctx.lineTo(Math.round(f.x), Math.round(f.y)); self.ctx.closePath(); self.ctx.strokeStyle = 'hsla('+f.hue+', 100%, '+f.brightness+'%, '+f.alpha+')'; self.ctx.stroke(); if(self.showTarget){ self.ctx.save(); self.ctx.beginPath(); self.ctx.arc(Math.round(f.targetX), Math.round(f.targetY), rand(1,8), 0, Math.PI*2, false) self.ctx.closePath(); self.ctx.lineWidth = 1; self.ctx.stroke(); self.ctx.restore(); } if(self.showShockwave){ self.ctx.save(); self.ctx.translate(Math.round(f.x), Math.round(f.y)); self.ctx.rotate(f.shockwaveAngle); self.ctx.beginPath(); self.ctx.arc(0, 0, 1*(f.speed/5), 0, Math.PI, true); self.ctx.strokeStyle = 'hsla('+f.hue+', 100%, '+f.brightness+'%, '+rand(25, 60)/100+')'; self.ctx.lineWidth = f.lineWidth; self.ctx.stroke(); self.ctx.restore(); } }; }; self.bindEvents = function(){ $(window).on('resize', function(){ clearTimeout(self.timeout); self.timeout = setTimeout(function() { self.canvas.width = self.cw = $(window).innerWidth(); self.canvas.height = self.ch = $(window).innerHeight(); self.ctx.lineCap = 'round'; self.ctx.lineJoin = 'round'; }, 100); }); $(self.canvas).on('mousedown', function(e){ self.mx = e.pageX - self.canvas.offsetLeft; self.my = e.pageY - self.canvas.offsetTop; self.currentHue = rand(self.hueMin, self.hueMax); self.createFireworks(self.cw/2, self.ch, self.mx, self.my); $(self.canvas).on('mousemove.fireworks', function(e){ self.mx = e.pageX - self.canvas.offsetLeft; self.my = e.pageY - self.canvas.offsetTop; self.currentHue = rand(self.hueMin, self.hueMax); self.createFireworks(self.cw/2, self.ch, self.mx, self.my); }); }); $(self.canvas).on('mouseup', function(e){ $(self.canvas).off('mousemove.fireworks'); }); } self.clear = function(){ self.particles = []; self.fireworks = []; self.ctx.clearRect(0, 0, self.cw, self.ch); }; self.canvasLoop = function(){ requestAnimFrame(self.canvasLoop, self.canvas); self.ctx.globalCompositeOperation = 'destination-out'; self.ctx.fillStyle = 'rgba(0,0,0,'+self.clearAlpha/100+')'; self.ctx.fillRect(0,0,self.cw,self.ch); self.updateFireworks(); self.updateParticles(); self.drawFireworks(); self.drawParticles(); }; self.init(); } var fworks = new Fireworks(); }); </script> </body> </html> ``` 看不清代码的话,请直接看引用页:[超令人赞叹的HTML5放烟花特效 绚丽烟花动画](http://www.codesc.net/jscss/3689.shtml "")
hue使用streaming上传文件失败
使用hue编写hadoop streaming 任务,可是配置了文件路径却没有上传,有人知道是什么原因吗? ![图片说明](https://img-ask.csdn.net/upload/201510/12/1444622462_617989.png) 这个路径上明明有的: ![图片说明](https://img-ask.csdn.net/upload/201510/12/1444622481_760429.png) 可是,结果: ![图片说明](https://img-ask.csdn.net/upload/201510/12/1444622475_56255.png)
Python怎样将这样的界面与后台代码交互?
界面用pyqt画的,导成了py文件,后台代码是抓数据库并且绘图的![图片说明](https://img-ask.csdn.net/upload/201807/10/1531191636_247698.png) GUI界面部分 ``` from PyQt5 import QtCore, QtGui, QtWidgets import sys class Ui_ANOVAWindow(object): def setupUi(self, ANOVAWindow): ANOVAWindow.setObjectName("ANOVAWindow") ANOVAWindow.resize(781, 462) self.label = QtWidgets.QLabel(ANOVAWindow) self.label.setGeometry(QtCore.QRect(30, 30, 71, 31)) self.label.setMinimumSize(QtCore.QSize(71, 31)) self.label.setObjectName("label") self.label_2 = QtWidgets.QLabel(ANOVAWindow) self.label_2.setGeometry(QtCore.QRect(30, 70, 71, 31)) self.label_2.setMinimumSize(QtCore.QSize(71, 31)) self.label_2.setObjectName("label_2") self.KeywordBox = QtWidgets.QLineEdit(ANOVAWindow) self.KeywordBox.setGeometry(QtCore.QRect(130, 40, 113, 20)) self.KeywordBox.setObjectName("KeywordBox") self.DataCButton = QtWidgets.QPushButton(ANOVAWindow) self.DataCButton.setGeometry(QtCore.QRect(70, 120, 121, 31)) self.DataCButton.setObjectName("DataCButton") self.label_3 = QtWidgets.QLabel(ANOVAWindow) self.label_3.setGeometry(QtCore.QRect(30, 190, 71, 31)) self.label_3.setMinimumSize(QtCore.QSize(71, 31)) self.label_3.setObjectName("label_3") self.label_4 = QtWidgets.QLabel(ANOVAWindow) self.label_4.setGeometry(QtCore.QRect(30, 230, 71, 31)) self.label_4.setMinimumSize(QtCore.QSize(71, 31)) self.label_4.setObjectName("label_4") self.label_5 = QtWidgets.QLabel(ANOVAWindow) self.label_5.setGeometry(QtCore.QRect(0, 270, 101, 31)) self.label_5.setMinimumSize(QtCore.QSize(71, 31)) self.label_5.setObjectName("label_5") self.label_6 = QtWidgets.QLabel(ANOVAWindow) self.label_6.setGeometry(QtCore.QRect(30, 310, 71, 31)) self.label_6.setMinimumSize(QtCore.QSize(71, 31)) self.label_6.setObjectName("label_6") self.label_7 = QtWidgets.QLabel(ANOVAWindow) self.label_7.setGeometry(QtCore.QRect(30, 350, 71, 31)) self.label_7.setMinimumSize(QtCore.QSize(71, 31)) self.label_7.setObjectName("label_7") self.RotueBox = QtWidgets.QLineEdit(ANOVAWindow) self.RotueBox.setGeometry(QtCore.QRect(130, 200, 113, 20)) self.RotueBox.setObjectName("RotueBox") self.LineBox = QtWidgets.QLineEdit(ANOVAWindow) self.LineBox.setGeometry(QtCore.QRect(130, 240, 113, 20)) self.LineBox.setObjectName("LineBox") self.DefectBox = QtWidgets.QLineEdit(ANOVAWindow) self.DefectBox.setGeometry(QtCore.QRect(130, 280, 113, 20)) self.DefectBox.setObjectName("DefectBox") self.AnovaXBox = QtWidgets.QLineEdit(ANOVAWindow) self.AnovaXBox.setGeometry(QtCore.QRect(130, 320, 113, 20)) self.AnovaXBox.setObjectName("AnovaXBox") self.AnovaYBox = QtWidgets.QLineEdit(ANOVAWindow) self.AnovaYBox.setGeometry(QtCore.QRect(130, 360, 113, 20)) self.AnovaYBox.setObjectName("AnovaYBox") self.VisualizeButton = QtWidgets.QPushButton(ANOVAWindow) self.VisualizeButton.setGeometry(QtCore.QRect(70, 400, 121, 31)) self.VisualizeButton.setObjectName("VisualizeButton") self.DateBox = QtWidgets.QDateEdit(ANOVAWindow) self.DateBox.setGeometry(QtCore.QRect(130, 80, 111, 22)) self.DateBox.setObjectName("DateBox") self.PicBox = QtWidgets.QLabel(ANOVAWindow) self.PicBox.setGeometry(QtCore.QRect(340, 30, 401, 371)) self.PicBox.setText("") self.PicBox.setObjectName("PicBox") self.retranslateUi(ANOVAWindow) QtCore.QMetaObject.connectSlotsByName(ANOVAWindow) def retranslateUi(self, ANOVAWindow): _translate = QtCore.QCoreApplication.translate ANOVAWindow.setWindowTitle(_translate("ANOVAWindow", "Dialog")) self.label.setText(_translate("ANOVAWindow", "<html><head/><body><p><span style=\" font-size:11pt;\">Keyword</span></p></body></html>")) self.label_2.setText(_translate("ANOVAWindow", "<html><head/><body><p><span style=\" font-size:11pt;\">Date</span></p></body></html>")) self.DataCButton.setText(_translate("ANOVAWindow", "Data Connection")) self.label_3.setText(_translate("ANOVAWindow", "<html><head/><body><p><span style=\" font-size:11pt;\">Route</span></p></body></html>")) self.label_4.setText(_translate("ANOVAWindow", "<html><head/><body><p><span style=\" font-size:11pt;\">Line</span></p></body></html>")) self.label_5.setText(_translate("ANOVAWindow", "<html><head/><body><p><span style=\" font-size:9pt;\">Defect of interest</span></p></body></html>")) self.label_6.setText(_translate("ANOVAWindow", "<html><head/><body><p><span style=\" font-size:11pt;\">ANOVA-X</span></p></body></html>")) self.label_7.setText(_translate("ANOVAWindow", "<html><head/><body><p><span style=\" font-size:11pt;\">ANOVA-Y</span></p></body></html>")) self.VisualizeButton.setText(_translate("ANOVAWindow", "Data Connection")) if __name__ == "__main__": app =QtWidgets.QApplication(sys.argv) widget = QtWidgets.QWidget() Ui_ANOVAWindow().setupUi(widget) widget.show() sys.exit(app.exec_()) ``` 后台代码部分 ``` import psycopg2 import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import re import os os.chdir(r'C:\Users\212712961\Desktop') ### Input ### kw = 'RAB6-D' mydate = '2018-04-12' ############# print ('Collecting results using keyword %s' % kw) # Step 1.1: Load StatisData from wx_query import connect_acoustic conn=connect_acoustic() from wx_query import load_stat df_stat = load_stat (conn, kw, mydate) # Step 1.2: Format conversion and cleaning of the StatisData from wx_analysis import stat_sig_conv, distinct_sn from wx_vistools import feature_trend_lite df_stat = stat_sig_conv(df_stat) sn_stat_kw = distinct_sn(df_stat['sn']) # Step 2: Load EDHR Data from wx_query import connect_psg, load_edhrv3 conn=connect_psg() df_edhr_full = load_edhrv3 (conn, kw, mydate) # Step 3: Load edms for the defects print ('loading scrap report' ) df_scrap = pd.read_csv('scrap_RAB6D_2018.csv', encoding='utf-8') df_scrap = df_scrap.rename(columns={'S/N':'sn'}) from wx_analysis import description_mapping as dm df_scrap['defect_category']=df_scrap['Defect'].map(dm) sn_scrap = distinct_sn(df_scrap['sn']) print('total edms distinct entries: %d' % len(sn_scrap)) # Step 4.0: Filtering edhr table by route_step and line_num of interest ### Input ### route_step_name = '010' line_number = '20' ############# df_edhr = df_edhr_full[(df_edhr_full['route_step_name']==route_step_name) & (df_edhr_full['line_number']==line_number)] sn_edhr_kw = distinct_sn(df_edhr['object_name']) # Step 4.1: Filtering statsdata and edhr by joining from wx_analysis import sn_join dict_sn_cmp = sn_join (sn_stat_kw, sn_edhr_kw, pflag=True) sn_scope = dict_sn_cmp ['inner'] df_stat = df_stat[df_stat['sn'].isin(sn_scope)] df_edhr = df_edhr[df_edhr['object_name'].isin(sn_scope)] sn_stat_kw = sn_scope sn_edhr_kw = sn_scope # Step 4.2: Filtering the edms with sn_scope df_scrap_kw =df_scrap[df_scrap['sn'].isin(sn_scope)] sn_scrap_kw = distinct_sn(df_scrap_kw['sn']) print ('after filtering with keyword %s, %d entries left' % (kw, len(sn_scrap_kw))) dict_sn_cmp = sn_join (sn_scope, sn_scrap_kw, pflag=True) sn_defect = dict_sn_cmp ['inner'] sn_good = dict_sn_cmp ['left_only'] # Step 5: Visualize good from bad df_vis = pd.merge(df_edhr, df_stat, how='inner', left_on='object_name', right_on='sn') df_vis = pd.merge(df_vis, df_scrap_kw, how='left', left_on='object_name', right_on='sn') df_vis.defect_category = df_vis.defect_category.fillna('NA') ### Input ### defect_of_interest = ['NA', 'lg'] ############# df_vis_sub = df_vis[df_vis['defect_category'].isin(defect_of_interest)] ### Input: ANOVA X, Y ### anovaX = 'user_name' fields = ['fl6_mean', 'fl6_std'] fields_to_choose_from = df_vis.columns ############# for f in fields: plt.figure() sns.stripplot (x='user_name', y=f, hue='defect_category', data=df_vis_sub, jitter=True, alpha=0.5, dodge=True, ax=plt.gca()) from wx_vistools import feature_trend_stat feature_trend_stat (df_vis_sub, xfactor=anovaX, fields=fields, cfactor='defect_category', crange=['NA', 'lg'], ttl='') ```
hue界面如何将英文转成中文,国际化怎么操作
现在已经把LANGUAGE_CODE = 'zh_CN',USE_I18N = True,USE_L10N = True ![图片说明](https://img-ask.csdn.net/upload/201609/21/1474423245_893707.png)
[工作流调度应用]求问HUE中Oozie编辑器是怎么实现的
需求是做一个类似hue的java web应用,可以向hue一样拖拽组件如mapreduce、hive、pig、sqoop,形成一个完成的工作流,问题就在于前台拖拽完组件后怎么连接? 在后台怎么拼接这些组件转换成xml?求大牛or有类似项目经验的大神解答,谢谢
hue上oozie配置spark2,执行任务的时候Application Type不是Spark而是MapReduce
如题,图片如下: ![图片说明](https://img-ask.csdn.net/upload/201908/03/1564813792_360531.png)
cloudera manager 离线安装安装agent时,向主节点下载资源超时
错误日志: [19/Nov/2018 16:16:04 +0000] 2789 MainThread stacks_collection_manager INFO Using max_uncompressed_file_size_bytes: 5242880 [19/Nov/2018 16:16:04 +0000] 2789 MainThread __init__ INFO Importing metric schema from file /opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/cmf/monitor/schema.json [19/Nov/2018 16:16:04 +0000] 2789 MainThread agent INFO Supervised processes will add the following to their environment (in addition to the supervisor's env): {'CDH_PARQUET_HOME': '/usr/lib/parquet', 'JSVC_HOME': '/usr/libexec/bigtop-utils', 'CMF_PACKAGE_DIR': '/opt/cloudera-manager/cm-5.10.2/lib64/cmf/service', 'CDH_HADOOP_BIN': '/usr/bin/hadoop', 'MGMT_HOME': '/opt/cloudera-manager/cm-5.10.2/share/cmf', 'CDH_IMPALA_HOME': '/usr/lib/impala', 'CDH_YARN_HOME': '/usr/lib/hadoop-yarn', 'CDH_HDFS_HOME': '/usr/lib/hadoop-hdfs', 'PATH': '/sbin:/usr/sbin:/bin:/usr/bin', 'CDH_HUE_PLUGINS_HOME': '/usr/lib/hadoop', 'CM_STATUS_CODES': u'STATUS_NONE HDFS_DFS_DIR_NOT_EMPTY HBASE_TABLE_DISABLED HBASE_TABLE_ENABLED JOBTRACKER_IN_STANDBY_MODE YARN_RM_IN_STANDBY_MODE', 'KEYTRUSTEE_KP_HOME': '/usr/share/keytrustee-keyprovider', 'CLOUDERA_ORACLE_CONNECTOR_JAR': '/usr/share/java/oracle-connector-java.jar', 'CDH_SQOOP2_HOME': '/usr/lib/sqoop2', 'KEYTRUSTEE_SERVER_HOME': '/usr/lib/keytrustee-server', 'CDH_MR2_HOME': '/usr/lib/hadoop-mapreduce', 'HIVE_DEFAULT_XML': '/etc/hive/conf.dist/hive-default.xml', 'CLOUDERA_POSTGRESQL_JDBC_JAR': '/opt/cloudera-manager/cm-5.10.2/share/cmf/lib/postgresql-9.0-801.jdbc4.jar', 'CDH_KMS_HOME': '/usr/lib/hadoop-kms', 'CDH_HBASE_HOME': '/usr/lib/hbase', 'CDH_SQOOP_HOME': '/usr/lib/sqoop', 'WEBHCAT_DEFAULT_XML': '/etc/hive-webhcat/conf.dist/webhcat-default.xml', 'CDH_OOZIE_HOME': '/usr/lib/oozie', 'CDH_ZOOKEEPER_HOME': '/usr/lib/zookeeper', 'CDH_HUE_HOME': '/usr/lib/hue', 'CLOUDERA_MYSQL_CONNECTOR_JAR': '/usr/share/java/mysql-connector-java.jar', 'CDH_HBASE_INDEXER_HOME': '/usr/lib/hbase-solr', 'CDH_MR1_HOME': '/usr/lib/hadoop-0.20-mapreduce', 'CDH_SOLR_HOME': '/usr/lib/solr', 'CDH_PIG_HOME': '/usr/lib/pig', 'CDH_SENTRY_HOME': '/usr/lib/sentry', 'CDH_CRUNCH_HOME': '/usr/lib/crunch', 'CDH_LLAMA_HOME': '/usr/lib/llama/', 'CDH_HTTPFS_HOME': '/usr/lib/hadoop-httpfs', 'ROOT': '/opt/cloudera-manager/cm-5.10.2/lib64/cmf', 'CDH_HADOOP_HOME': '/usr/lib/hadoop', 'CDH_HIVE_HOME': '/usr/lib/hive', 'ORACLE_HOME': '/usr/share/oracle/instantclient', 'CDH_HCAT_HOME': '/usr/lib/hive-hcatalog', 'CDH_KAFKA_HOME': '/usr/lib/kafka', 'CDH_SPARK_HOME': '/usr/lib/spark', 'TOMCAT_HOME': '/usr/lib/bigtop-tomcat', 'CDH_FLUME_HOME': '/usr/lib/flume-ng'} [19/Nov/2018 16:16:04 +0000] 2789 MainThread agent INFO To override these variables, use /etc/cloudera-scm-agent/config.ini. Environment variables for CDH locations are not used when CDH is installed from parcels. [19/Nov/2018 16:16:04 +0000] 2789 MainThread agent INFO Created /opt/cloudera-manager/cm-5.10.2/run/cloudera-scm-agent/process [19/Nov/2018 16:16:04 +0000] 2789 MainThread agent INFO Chmod'ing /opt/cloudera-manager/cm-5.10.2/run/cloudera-scm-agent/process to 0751 [19/Nov/2018 16:16:04 +0000] 2789 MainThread agent INFO Created /opt/cloudera-manager/cm-5.10.2/run/cloudera-scm-agent/supervisor [19/Nov/2018 16:16:04 +0000] 2789 MainThread agent INFO Chmod'ing /opt/cloudera-manager/cm-5.10.2/run/cloudera-scm-agent/supervisor to 0751 [19/Nov/2018 16:16:04 +0000] 2789 MainThread agent INFO Created /opt/cloudera-manager/cm-5.10.2/run/cloudera-scm-agent/flood [19/Nov/2018 16:16:04 +0000] 2789 MainThread agent INFO Chowning /opt/cloudera-manager/cm-5.10.2/run/cloudera-scm-agent/flood to cloudera-scm (498) cloudera-scm (498) [19/Nov/2018 16:16:04 +0000] 2789 MainThread agent INFO Chmod'ing /opt/cloudera-manager/cm-5.10.2/run/cloudera-scm-agent/flood to 0751 [19/Nov/2018 16:16:04 +0000] 2789 MainThread agent INFO Created /opt/cloudera-manager/cm-5.10.2/run/cloudera-scm-agent/supervisor/include [19/Nov/2018 16:16:04 +0000] 2789 MainThread agent INFO Chmod'ing /opt/cloudera-manager/cm-5.10.2/run/cloudera-scm-agent/supervisor/include to 0751 [19/Nov/2018 16:16:04 +0000] 2789 MainThread agent ERROR Failed to connect to previous supervisor. Traceback (most recent call last): File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/cmf/agent.py", line 2073, in find_or_start_supervisor self.configure_supervisor_clients() File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/cmf/agent.py", line 2254, in configure_supervisor_clients supervisor_options.realize(args=["-c", os.path.join(self.supervisor_dir, "supervisord.conf")]) File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/supervisor-3.0-py2.6.egg/supervisor/options.py", line 1599, in realize Options.realize(self, *arg, **kw) File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/supervisor-3.0-py2.6.egg/supervisor/options.py", line 333, in realize self.process_config() File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/supervisor-3.0-py2.6.egg/supervisor/options.py", line 341, in process_config self.process_config_file(do_usage) File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/supervisor-3.0-py2.6.egg/supervisor/options.py", line 376, in process_config_file self.usage(str(msg)) File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/supervisor-3.0-py2.6.egg/supervisor/options.py", line 164, in usage self.exit(2) SystemExit: 2 [19/Nov/2018 16:16:04 +0000] 2789 MainThread tmpfs INFO Successfully mounted tmpfs at /opt/cloudera-manager/cm-5.10.2/run/cloudera-scm-agent/process [19/Nov/2018 16:16:05 +0000] 2789 MainThread agent INFO Trying to connect to newly launched supervisor (Attempt 1) [19/Nov/2018 16:16:05 +0000] 2789 MainThread agent INFO Supervisor version: 3.0, pid: 2821 [19/Nov/2018 16:16:05 +0000] 2789 MainThread agent INFO Successfully connected to supervisor [19/Nov/2018 16:16:05 +0000] 2789 MainThread status_server INFO Using maximum impala profile bundle size of 1073741824 bytes. [19/Nov/2018 16:16:05 +0000] 2789 MainThread status_server INFO Using maximum stacks log bundle size of 1073741824 bytes. [19/Nov/2018 16:16:05 +0000] 2789 MainThread _cplogging INFO [19/Nov/2018:16:16:05] ENGINE Bus STARTING [19/Nov/2018 16:16:05 +0000] 2789 MainThread _cplogging INFO [19/Nov/2018:16:16:05] ENGINE Started monitor thread '_TimeoutMonitor'. [19/Nov/2018 16:16:06 +0000] 2789 MainThread _cplogging INFO [19/Nov/2018:16:16:06] ENGINE Serving on yingzhi01.com:9000 [19/Nov/2018 16:16:06 +0000] 2789 MainThread _cplogging INFO [19/Nov/2018:16:16:06] ENGINE Bus STARTED [19/Nov/2018 16:16:06 +0000] 2789 MainThread __init__ INFO New monitor: (<cmf.monitor.host.HostMonitor object at 0x2990c50>,) [19/Nov/2018 16:16:06 +0000] 2789 MonitorDaemon-Scheduler __init__ INFO Monitor ready to report: ('HostMonitor',) [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent INFO Setting default socket timeout to 30 [19/Nov/2018 16:16:06 +0000] 2789 Monitor-HostMonitor network_interfaces INFO NIC iface eth0 doesn't support ETHTOOL (95) [19/Nov/2018 16:16:06 +0000] 2789 Monitor-HostMonitor throttling_logger ERROR Error getting directory attributes for /opt/cloudera-manager/cm-5.10.2/log/cloudera-scm-agent Traceback (most recent call last): File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/cmf/monitor/dir_monitor.py", line 90, in _get_directory_attributes name = pwd.getpwuid(uid)[0] KeyError: 'getpwuid(): uid not found: 1106' [19/Nov/2018 16:16:06 +0000] 2789 MainThread heartbeat_tracker INFO HB stats (seconds): num:1 LIFE_MIN:0.22 min:0.22 mean:0.22 max:0.22 LIFE_MAX:0.22 [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent INFO CM server guid: dceeafae-a884-42f1-ba7b-4ee187ef3bef [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent INFO Using parcels directory from server provided value: /opt/cloudera/parcels [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent WARNING Expected user root for /opt/cloudera/parcels but was cloudera-scm [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent WARNING Expected group root for /opt/cloudera/parcels but was cloudera-scm [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent INFO Created /opt/cloudera/parcel-cache [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent INFO Chowning /opt/cloudera/parcel-cache to root (0) root (0) [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent INFO Chmod'ing /opt/cloudera/parcel-cache to 0755 [19/Nov/2018 16:16:06 +0000] 2789 MainThread parcel INFO Agent does create users/groups and apply file permissions [19/Nov/2018 16:16:06 +0000] 2789 MainThread downloader INFO Downloader path: /opt/cloudera/parcel-cache [19/Nov/2018 16:16:06 +0000] 2789 MainThread parcel_cache INFO Using /opt/cloudera/parcel-cache for parcel cache [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent INFO Flood daemon (re)start attempt [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent INFO Created /opt/cloudera/parcels/.flood [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent INFO Chowning /opt/cloudera/parcels/.flood to cloudera-scm (498) cloudera-scm (498) [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent INFO Chmod'ing /opt/cloudera/parcels/.flood to 0755 [19/Nov/2018 16:16:06 +0000] 2789 MainThread agent INFO Triggering supervisord update. [19/Nov/2018 16:16:36 +0000] 2789 MainThread downloader ERROR Failed rack peer update: timed out [19/Nov/2018 16:16:36 +0000] 2789 MainThread agent INFO Active parcel list updated; recalculating component info. [19/Nov/2018 16:16:36 +0000] 2789 MainThread throttling_logger WARNING CMF_AGENT_JAVA_HOME environment variable host override will be deprecated in future. JAVA_HOME setting configured from CM server takes precedence over host agent override. Configure JAVA_HOME setting from CM server. [19/Nov/2018 16:16:36 +0000] 2789 MainThread throttling_logger INFO Identified java component java8 with full version JAVA_HOME=/opt/modules/jdk1.8.0_144 java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01) Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode) for requested version . [19/Nov/2018 16:16:36 +0000] 2789 MainThread agent WARNING Long HB processing time: 30.6659779549 [19/Nov/2018 16:16:36 +0000] 2789 MainThread agent WARNING Delayed HB: 15s since last [19/Nov/2018 16:16:44 +0000] 2789 Monitor-HostMonitor throttling_logger ERROR Timeout with args ['ntpdc', '-np'] None [19/Nov/2018 16:16:44 +0000] 2789 Monitor-HostMonitor throttling_logger ERROR Failed to collect NTP metrics Traceback (most recent call last): File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/cmf/monitor/host/ntp_monitor.py", line 48, in collect self.collect_ntpd() File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/cmf/monitor/host/ntp_monitor.py", line 66, in collect_ntpd result, stdout, stderr = self._subprocess_with_timeout(args, self._timeout) File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/cmf/monitor/host/ntp_monitor.py", line 38, in _subprocess_with_timeout return subprocess_with_timeout(args, timeout) File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/cmf/subprocess_timeout.py", line 94, in subprocess_with_timeout raise Exception("timeout with args %s" % args) Exception: timeout with args ['ntpdc', '-np'] [19/Nov/2018 16:17:06 +0000] 2789 DnsResolutionMonitor throttling_logger INFO Using java location: '/opt/modules/jdk1.8.0_144/bin/java'. [19/Nov/2018 16:17:06 +0000] 2789 MainThread downloader ERROR Failed rack peer update: timed out [19/Nov/2018 16:17:06 +0000] 2789 MainThread agent WARNING Long HB processing time: 30.1082139015 [19/Nov/2018 16:17:06 +0000] 2789 MainThread agent WARNING Delayed HB: 15s since last [19/Nov/2018 16:17:36 +0000] 2789 MainThread downloader ERROR Failed rack peer update: timed out [19/Nov/2018 16:17:36 +0000] 2789 MainThread agent WARNING Long HB processing time: 30.1235852242 [19/Nov/2018 16:17:36 +0000] 2789 MainThread agent WARNING Delayed HB: 15s since last [19/Nov/2018 16:18:07 +0000] 2789 MainThread downloader ERROR Failed rack peer update: timed out [19/Nov/2018 16:18:07 +0000] 2789 MainThread agent WARNING Long HB processing time: 30.1040799618 [19/Nov/2018 16:18:07 +0000] 2789 MainThread agent WARNING Delayed HB: 15s since last [19/Nov/2018 16:18:37 +0000] 2789 MainThread downloader ERROR Failed rack peer update: timed out [19/Nov/2018 16:18:37 +0000] 2789 MainThread agent WARNING Long HB processing time: 30.1849529743 [19/Nov/2018 16:18:37 +0000] 2789 MainThread agent WARNING Delayed HB: 15s since last [19/Nov/2018 16:19:07 +0000] 2789 MainThread downloader ERROR Failed rack peer update: timed out [19/Nov/2018 16:19:07 +0000] 2789 MainThread agent WARNING Long HB processing time: 30.1211960316 [19/Nov/2018 16:19:07 +0000] 2789 MainThread agent WARNING Delayed HB: 15s since last [19/Nov/2018 16:19:37 +0000] 2789 MainThread downloader ERROR Failed rack peer update: timed out [19/Nov/2018 16:19:37 +0000] 2789 MainThread agent WARNING Long HB processing time: 30.1215620041 [19/Nov/2018 16:19:37 +0000] 2789 MainThread agent WARNING Delayed HB: 15s since last [19/Nov/2018 16:20:01 +0000] 2789 CP Server Thread-4 _cplogging INFO 192.168.164.35 - - [19/Nov/2018:16:20:01] "GET /heartbeat HTTP/1.1" 200 2 "" "NING/1.0" [19/Nov/2018 16:20:04 +0000] 2789 CP Server Thread-5 _cplogging INFO 192.168.164.35 - - [19/Nov/2018:16:20:04] "GET /heartbeat HTTP/1.1" 200 2 "" "NING/1.0" [19/Nov/2018 16:20:07 +0000] 2789 MainThread downloader ERROR Failed rack peer update: timed out [19/Nov/2018 16:20:07 +0000] 2789 MainThread agent WARNING Long HB processing time: 30.1212861538 [19/Nov/2018 16:20:07 +0000] 2789 MainThread agent WARNING Delayed HB: 15s since last [19/Nov/2018 16:20:37 +0000] 2789 MainThread downloader ERROR Failed rack peer update: timed out [19/Nov/2018 16:20:37 +0000] 2789 MainThread agent WARNING Long HB processing time: 30.1753029823 [19/Nov/2018 16:20:37 +0000] 2789 MainThread agent WARNING Delayed HB: 15s since last [19/Nov/2018 16:20:37 +0000] 2789 Thread-13 downloader INFO Fetching torrent: http://yingzhi01.com:7180/cmf/parcel/download/CDH-5.10.2-1.cdh5.10.2.p0.5-el6.parcel.torrent [19/Nov/2018 16:20:37 +0000] 2789 Thread-13 downloader INFO Starting download of: http://yingzhi01.com:7180/cmf/parcel/download/CDH-5.10.2-1.cdh5.10.2.p0.5-el6.parcel [19/Nov/2018 16:21:07 +0000] 2789 Thread-13 downloader ERROR Unexpected exception during download Traceback (most recent call last): File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/cmf/downloader.py", line 279, in download self.client.AddTorrent(torrent_url) File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/flood/util/cmd.py", line 159, in __call__ return self.fn.__get__(self.binding)(*args, **kwargs) File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/flood/util/rpc.py", line 68, in <lambda> return lambda *pargs, **kwargs: self._invoke(*pargs, **kwargs) File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/flood/util/rpc.py", line 77, in _invoke return rpcClient.requestor.request(self.schema.name, msg) File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/flood/util/rpc.py", line 129, in requestor return avro.ipc.Requestor(self.SCHEMA, self.transceiver) File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.10.2-py2.6.egg/flood/util/rpc.py", line 125, in transceiver return avro.ipc.HTTPTransceiver(self.server.host, self.server.port) File "/opt/cloudera-manager/cm-5.10.2/lib64/cmf/agent/build/env/lib/python2.6/site-packages/avro-1.6.3-py2.6.egg/avro/ipc.py", line 469, in __init__ self.conn.connect() File "/usr/lib64/python2.6/httplib.py", line 771, in connect self.timeout) File "/usr/lib64/python2.6/socket.py", line 567, in create_connection raise error, msg timeout: timed out [19/Nov/2018 16:21:07 +0000] 2789 Thread-13 downloader INFO Finished download [ url: http://yingzhi01.com:7180/cmf/parcel/download/CDH-5.10.2-1.cdh5.10.2.p0.5-el6.parcel, state: exception, total_bytes: 0, downloaded_bytes: 0, start_time: 2018-11-19 16:20:37, download_end_time: , end_time: 2018-11-19 16:21:07, code: 600, exception_msg: timed out, path: None ] [19/Nov/2018 16:21:07 +0000] 2789 MainThread downloader ERROR Failed rack peer update: timed out [19/Nov/2018 16:21:07 +0000] 2789 MainThread agent WARNING Long HB processing time: 30.1247620583 [19/Nov/2018 16:21:07 +0000] 2789 MainThread agent WARNING Delayed HB: 15s since last [19/Nov/2018 16:21:07 +0000] 2789 Thread-13 downloader INFO Fetching torrent: http://yingzhi01.com:7180/cmf/parcel/download/CDH-5.10.2-1.cdh5.10.2.p0.5-el6.parcel.torrent [19/Nov/2018 16:21:08 +0000] 2789 Thread-13 downloader INFO Starting download of: http://yingzhi01.com:7180/cmf/parcel/download/CDH-5.10.2-1.cdh5.10.2.p0.5-el6.parcel [19/Nov/2018 16:21:38 +0000] 2789 Thread-13 downloader ERROR Unexpected exception during download 然后就是不断重复超时错误求大神指点。。。
使用hue集成oozie 运行 shell 脚本 完成度为95% 状态持续为running
查看MR日志,error信息: ![图片说明](https://img-ask.csdn.net/upload/201810/23/1540277077_955455.png) hadoop:8088 上面状态一直为RUNNING ,内存有剩余
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、PDF搜索网站推荐 对于大部
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Vue + Spring Boot 项目实战(十四):用户认证方案与完善的访问拦截
本篇文章主要讲解 token、session 等用户认证方案的区别并分析常见误区,以及如何通过前后端的配合实现完善的访问拦截,为下一步权限控制的实现打下基础。
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入  假设现有4个人
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
SQL-小白最佳入门sql查询一
一 说明 如果是初学者,建议去网上寻找安装Mysql的文章安装,以及使用navicat连接数据库,以后的示例基本是使用mysql数据库管理系统; 二 准备前提 需要建立一张学生表,列分别是id,名称,年龄,学生信息;本示例中文章篇幅原因SQL注释略; 建表语句: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // dosho
漫话:什么是平衡(AVL)树?这应该是把AVL树讲的最好的文章了
这篇文章通过对话的形式,由浅入深带你读懂 AVL 树,看完让你保证理解 AVL 树的各种操作,如果觉得不错,别吝啬你的赞哦。 1、若它的左子树不为空,则左子树上所有的节点值都小于它的根节点值。 2、若它的右子树不为空,则右子树上所有的节点值均大于它的根节点值。 3、它的左右子树也分别可以充当为二叉查找树。 例如: 例如,我现在想要查找数值为14的节点。由于二叉查找树的特性,我们可...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
开源并不是你认为的那些事
点击上方蓝字 关注我们开源之道导读所以 ————想要理清开源是什么?先要厘清开源不是什么,名正言顺是句中国的古代成语,概念本身的理解非常之重要。大部分生物多样性的起源,...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
      11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下
《C++ Primer》学习笔记(六):C++模块设计——函数
专栏C++学习笔记 《C++ Primer》学习笔记/习题答案 总目录 https://blog.csdn.net/TeFuirnever/article/details/100700212 —————————————————————————————————————————————————————— 《C++ Primer》习题参考答案:第6章 - C++模块设计——函数 文章目录专栏C+...
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
so easy! 10行代码写个"狗屁不通"文章生成器
前几天,GitHub 有个开源项目特别火,只要输入标题就可以生成一篇长长的文章。背后实现代码一定很复杂吧,里面一定有很多高深莫测的机器学习等复杂算法不过,当我看了源代码之后这程序不到50
知乎高赞:中国有什么拿得出手的开源软件产品?(整理自本人原创回答)
知乎高赞:中国有什么拿得出手的开源软件产品? 在知乎上,有个问题问“中国有什么拿得出手的开源软件产品(在 GitHub 等社区受欢迎度较好的)?” 事实上,还不少呢~ 本人于2019.7.6进行了较为全面的 回答 - Bravo Yeung,获得该问题下回答中得最高赞(236赞和1枚专业勋章),对这些受欢迎的 Github 开源项目分类整理如下: 分布式计算、云平台相关工具类 1.SkyWalk
相关热词 c# 输入ip c# 乱码 报表 c#选择结构应用基本算法 c# 收到udp包后回包 c#oracle 头文件 c# 序列化对象 自定义 c# tcp 心跳 c# ice连接服务端 c# md5 解密 c# 文字导航控件
立即提问