yarn

01-Taro打造hello-world应用

岁酱吖の 提交于 2020-07-27 04:08:39
01-Taro打造hello-world应用 一、简介 Taro 是由京东凹凸实验室出品,书写一套代码通过 Taro 的编译工具,将源代码分别编译出可以在不同端( 微信 / 京东 / 百度 / 支付宝 / 字节跳动 小程序、 快应用 、H5、React-Native 等)运行的代码。废话不多说,先从hello-world开始吧。 二、搭建环境 // node>=8.0.0 npm install -g @tarojs/cli taro -v taro init taroDemo 不好意思我果断control+z <!--more--> cd taroDemo yarn 安装依赖成功后咱先体验一把weapp、alipay、h5的效果 三、小试牛刀 // dev 开发 build 生产 yarn dev:weapp // 微信小程序 yarn dev:alipay // 支付宝小程序 yarn dev:h5 以微信小程序为例 cd taroDemo yarn dev:weapp // 打开微信开发工具 导入dist目录 如果想生成支付宝小程序则control+z 再 yarn dev:alipay, 生成的dist目录就是支付宝小程序了 四、项目结构 五、多端同步调试 在 config/index.js 配置 outputRoot: `dist/${process.env.TARO

hadoop伪分布式搭建

不羁岁月 提交于 2020-07-27 00:03:36
第一步: 修改主机名: hostnamectl set - hostname hadoop 查看主机名: hostname 查看虚拟机信息: hostnamectl 第二步: 添加hadoop用户: sudo useradd - m hadoop2 - s / bin / bash 设置密码: sudo passwd hadoop2 第三步: 添加映射: vim /etc/hosts 在第一行添加自己的本机ip和本机名称 第四步: 注意一定要切换到hadoop2用户下操作 设置免密: 1. ssh - keygen - t rsa 生成一个公钥和私钥 , 三次回车 2. ssh - copy - id hadoop2 将公钥拷贝到hadoop2,输入yes,密码 3. ssh hadoop2 测试免密登录成功 第五步: 关闭防火墙: systemctl disable firewalld 输入两次密码 第六步: 安装jdk 1. 切换成root用户,家目录下cd ~ 2. 使用xftp传输文件,传输到那个目录,就在那个目录使用解压命令 3. tar - zxvf jdk - 8u 101 - linux - x64 . tar . gz - C / usr / local / 解压到usr / local下 4. 配置环境变量 vim / etc / profile 添加:

大数据容器化,头部玩家尝到了甜头?

强颜欢笑 提交于 2020-07-25 07:59:08
大数据的需求热度,从来都是这个时代的浪尖。然而由于大数据系统的复杂性,一度导致业界大数据已死的各种声音不断。尤其是当MapR被HPE收购,Cloudera公司股票持续跌成狗,使得这种声音进一步放大。其实,大数据的需求一直在,只是传统的大数据实现系统需要考虑重新构建。 而容器依靠其自身的标准化,一次构建,随处运行的能力,使得非常适合大数据系统的构建和管理。容器技术当前正是那只火遍全球的当红辣子鸡。 1 华为云BigData Pro大数据解决方案荣获行业年度金奖 2019年12月3日晚,2019年度中国数据与存储峰会年度颁奖典礼上,华为云BigData Pro大数据解决方案荣获“2019年度大数据产品金奖”,再一次展示了华为云在大数据领域的不凡实力。中国数据与存储峰会(DSS)是国内顶级的数据与存储领域技术盛会,其颁发的奖项颇具含金量,在十多年间见证了国内数据存储技术和行业的迅猛发展。此次评选范围涉及私有云大数据,公有云大数据,大数据软件,大数据解决方案等多个领域和维度。本次华为云BigData Pro能一举拿下该金奖,也是实至名归。 2 大数据容器化,大势所趋 目前已经有大量的大数据系统原生支持on Kubernetes。例如Spark官方版本,从2.3开始,就可以无需任何修改直接跑在K8s上。并且,将“更好的在k8s上运行”作为后续版本的重要特性方向

目前解决移动端1px边框最好的方法

拜拜、爱过 提交于 2020-07-25 02:14:33
在移动端开发时,经常会遇到在视网膜屏幕中元素边框变粗的问题。本文将带你探讨边框变粗问题的产生原因及介绍目前市面上最好的解决方法。 1px 边框问题的由来 苹果 iPhone4 首次提出了 Retina Display(视网膜屏幕)的概念,在 iPhone4 使用的视网膜屏幕中,把 2x2 个像素当 1 个物理像素使用,即使用 2x2 个像素显示原来 1 个物理像素显示的内容,从而让 UI 显示更精致清晰,这 2x2 个像素叫做逻辑像素。像这种像素比(像素比(即dpr)= 物理像素 / 逻辑像素)为 2 的视网膜屏幕也被称为二倍屏,目前市面上还有像素比更高的三倍屏、四倍屏。而 CSS 中 1px 指的是物理像素,因此,设置为 1px 的边框在 dpr = 2 的视网膜屏幕中实际占用了 2 个逻辑像素的宽度,这就导致了界面边框变粗的视觉体验。 使用 transform 解决 通过设置元素的 box-sizing 为 border-box,然后构建伪元素,再使用 CSS3 的 transform 缩放,这是目前市面上最受推崇的解决方法。这种方法可以满足所有的场景,而且修改灵活,唯一的缺陷是,对于已使用伪元素的元素要多嵌套一个无用元素。具体的实现如下: .one-pixel-border { position: relative; box-sizing: border-box; }

CDH在yarn上运行程序乱码

▼魔方 西西 提交于 2020-07-24 02:32:37
参考文章: CDH在yarn上运行程序乱码 安装完成CDH后,在yarn上不管是使用hive运行mapreduce还是spark,中文全都会乱码。 1. linux的环境变量设置字符集 vi /etc/profile export LANG=zh_CN.UTF-8 2. 修改mapreduce的环境变量 hadoop-env.sh export HADOOP_OPTS="-server -Dfile.encoding=utf-8 -Duser.language=zh" CM界面yarn配置(mapred-site.xml)搜索 mapreduce.map.java.opts -Djava.net.preferIPv4Stack=true -Dfile.encoding=utf-8 -Duser.language=zh mapreduce.reduce.java.opts -Djava.net.preferIPv4Stack=true -Dfile.encoding=utf-8 -Duser.language=zh yarn.app.mapreduce.am.command-opts -Djava.net.preferIPv4Stack=true -Dfile.encoding=utf-8 -Duser.language=zh 3. 修改spark字符集

How to choose the queue for Spark job using spark-submit?

ぃ、小莉子 提交于 2020-07-17 17:45:27
问题 Is there a way to provide parameters or settings to choose the queue in which I'd like my spark_submit job to run? 回答1: By using --queue So an example of a spark-submit job would be:- spark-submit --master yarn --conf spark.executor.memory=48G --conf spark.driver.memory=6G --packages [packages separated by ,] --queue [queue_name] --class [class_name] [jar_file] [arguments] 来源: https://stackoverflow.com/questions/43551337/how-to-choose-the-queue-for-spark-job-using-spark-submit

How to choose the queue for Spark job using spark-submit?

二次信任 提交于 2020-07-17 17:43:12
问题 Is there a way to provide parameters or settings to choose the queue in which I'd like my spark_submit job to run? 回答1: By using --queue So an example of a spark-submit job would be:- spark-submit --master yarn --conf spark.executor.memory=48G --conf spark.driver.memory=6G --packages [packages separated by ,] --queue [queue_name] --class [class_name] [jar_file] [arguments] 来源: https://stackoverflow.com/questions/43551337/how-to-choose-the-queue-for-spark-job-using-spark-submit

Is there a way to catch executor killed exception in Spark?

吃可爱长大的小学妹 提交于 2020-06-26 06:14:13
问题 During execution of my Spark program, sometimes (The reason for it is still a mystery to me) yarn kills containers (executors) giving the message that the memory limit was exceeded. My program does recover though with Spark re-executing the task by spawning a new container. However, in my program, a task also creates some intermediate files on the disk. When a container is killed, those files are left behind. Is there a way I can catch the executor-killed as an exception so that I can delete

Installing private package from Github Package registry using Yarn fails with not authorized

谁都会走 提交于 2020-06-25 03:24:47
问题 This question is related to these. But none of the solutions worked for me. Yarn can't find private Github npm registry Installing private package from Github Package registry fails with not found/not authorized I can install a package without issues with npm install @scope/package however I cannot do the same with yarn: yarn add @scope/package yarn throws the following error: An unexpected error occurred: "https://npm.pkg.github.com/download/@scope/package/1.2.8

Difference between “spark.yarn.executor.memoryOverhead” and “spark.memory.offHeap.size”

人走茶凉 提交于 2020-05-27 13:31:07
问题 I am running spark on yarn. I don't understand what is the difference between the following settings spark.yarn.executor.memoryOverhead and spark.memory.offHeap.size . Both seem to be settings for allocating off-heap memory to spark executor. Which one should I use? Also what is the recommended setting for executor offheap memory? Many thanks! 回答1: spark.executor.memoryOverhead is used by resource management like YARN, whereas spark.memory.offHeap.size is used by Spark core (memory manager).