zoukankan      html  css  js  c++  java
  • Mac 开发 Hue

    1)环境准备

    Maven 3.6.1

    python (Anaconda 2.7.16)

    MySQL 5.7

    git 2.21

    2)Hue源码下载

    git clone git@github.com:arwangasdaf/arwangasdaf.github.io.git 

    3)编译

    1、到hue下执行 make apps

    此时可能会遇到到bug有:

    - 无法找到python.h文件

    解决办法:修改 Makefile.vars 文件

     在这里我是修改了默认的python路径到Anaconda下的python下

    - 找不到openssl 

    解决办法:

    brew upgrade openssl

    export CPPFLAGS=-I/usr/local/opt/openssl/include

    export LDFLAGS=-L/usr/local/opt/openssl/lib

    - 找不到sasl.h

    解决办法:

    执行

    export CFLAGS="-I$(xcrun --show-sdk-path)/usr/include/sasl"

    pip install python-ldap

    - 找不到mysql的config

    修改mysql_config的路径

    4)MySQL初始化

    Hue默认以自带的sqlite数据库保存元数据,但是不适合开发环境,在这里需要使用MySQL来替代默认的sqlite数据库

    - MySQL新建Hue表和Hue用户

    create database hue default character set utf8 default collate utf8_general_ci;

    grant all on hue.* to 'hue'@'%' identified by 'hue';

    grant all privileges on *.* to hue@localhost identified by 'hue' with grant option;

    select * from information_schema.schemata;

    flush privileges;

    - Hue修改 pseudo-distributed.ini 文件

    [[database]] 

      engine=mysql
      host=localhost
      port=3306
      user=hue
      password=hue
      name=hue

    - 数据库迁移

    在build/env下执行

    bin/hue syncdb

    bin/hue migrate

    5)pycharm搭建Hue开发环境

    - 在pycharm中打开Hue工程

    - 在preference中选择Interpreter

    这个地方一定要选择编译出来的build/env/bin下的python环境

    - Django环境变量

    - Edit configuration

    点击run即可启动

    6)选择sparkSql的Editor,修改 pseudo-distributed.ini 文件

    [[[sparksql]]]

      name=SparkSql

      interface=hiveserver2

    [spark]

       # Host of the Sql Server

       sql_server_host=host

       # Port of the Sql Server

       sql_server_port=10001

    重启Hue即可完成功能

  • 相关阅读:
    HTML5新特性之文件和二进制数据的操作
    HTML5本地存储之IndexedDB
    HTML5新标签之Canvas
    HTML5 Canvas实战之烟花效果
    Asp.NET core/net 5接口返回实体含有long/int64的属性序列后最后几位变为0的解决
    Aero for WTL application
    C++WTL基于MCI的音频播放器源码
    c++ 深拷贝,浅拷贝,赋值操作的调用情况
    发布一个生成按钮图片的工具 c#写的
    贴图:CImage VS Bitmap
  • 原文地址:https://www.cnblogs.com/frankwt/p/10986907.html
Copyright © 2011-2022 走看看