自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 Hive使用中的注意事项

1.导入数据显示中文的问题数据导入前需将编码格式更改为utf-8再导入hive数据库,这样查询之后的结果才能正常显示中文而不是乱码,并且可以在相应的HiveQL语句中使用中文对某个字段进行判断。2.查询结果显示列名在hive-site.xml中设置hive.cli.print.header=true即可。3.对COL求平均数并取整数ROUND(AVG(COL))

2016-07-31 18:24:08 527

原创 Hive2.1.0的 Web Interface配置

首先需要从官网下载与当前Hive版本相对应的src文件,并进入到hive/hwi目录下,将web打包成war格式的压缩包,使用命令:jar cfM hive-hwi-2.1.0.war -C web .将压缩包复制到hive/lib/目录下,并配置hive-site.xml中的相关内容    hive.hwi.listen.host    0.0.0.0    This is

2016-07-29 14:59:47 2448

原创 Ubuntu系统下配置Hadoop2.7.1+Hive2.1.0

前言安装过程中遇到的问题从以下博客学习而得,现对其进行整理在Hadoop1.2.1分布式集群环境下安装hive0.12CentOS下Hive2.0.0单机模式安装详解 CentOS下Hive2.0.0集群模式安装详解 解决Hive installation issues: Hive metastore database is not initialized hive启动报错

2016-07-26 19:28:41 5879

原创 Ubuntu系统下配置Hadoop2.7.1

Hadoop2.7.1与之前版本的配置方法类似,需要先安装java,配置环境变量JAVA_HOME、CLASSPATH(java的lib路径)、以及PATH(java的bin路径)。然后安装Hadoop,配置HADOOP_HOME、CLASSPATH(Hadoop的lib路径)、以及PATH(Hadoop的bin以及sbin路径),配置hadoop-env.sh、core-site.x

2016-07-26 18:47:06 679

原创 136. Single Number

题目Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without u

2016-07-20 09:53:31 249

原创 338. Counting Bits

题目Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.Example:For

2016-07-19 21:09:31 216

原创 8. String to Integer (atoi)

题目Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible

2016-07-18 17:02:59 336

原创 165. Compare Version Numbers

题目Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0.You may assume that the version strings are non-empt

2016-07-18 15:18:30 194

原创 189. Rotate Array

题目Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note:Try to come up as many solutio

2016-07-18 11:25:07 288

原创 关于Multimap的遍历和删除

C++的STL的关联容器multimap允许一个key值对应多个值,当对整个multimap进行遍历时可以使用迭代器,迭代器会指向多个键值对,而不是一个键值后的多个值,当希望输出key:value1 value2...形式时,需要使用count函数计算一个key值包含多少个值,然后使用循环对迭代器自增输出这些值。当需要删除多个值中的某一个时,使用equal_range函数保存某一key值对应所

2016-07-15 18:11:37 16276

原创 168. Excel Sheet Column Title

题目Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB 分

2016-07-14 13:16:49 421

原创 278. First Bad Version

题目You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed base

2016-07-14 11:52:49 192

原创 155. Min Stack

题目Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top()

2016-07-14 10:25:54 227

原创 Windows系统配置技巧

一、更改系统用户名以及对应的用户目录名称1.在控制面板的用户帐户中更改帐户名称为B。2.打开“C:\Users”或者“用户”文件夹,将文件夹A重命名为B。3.使用WIN+R打开运行,输入“regedit”。4.在注册表编辑器中定位到以下路径:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Profi

2016-07-10 23:57:44 582

原创 7. Reverse Integer

题目Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are some good questions to ask

2016-07-08 10:28:49 221

原创 125. Valid Palindrome

题目Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car" i

2016-07-07 15:30:29 166

原创 1. Two Sum

题目Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution.Example:Give

2016-07-07 14:29:48 225

原创 6. ZigZag Conversion

题目The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA

2016-07-07 10:20:21 216

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除