I am not sure if you have an old version of IntelliJ but If I go File => Settings… => Inspections => Serialization issues => Serializable class without ‘serialVersionUID’ enabled, the class you provide give me warnings
ssh -T git@github.com Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts. Hi zhang.san! You've successfully authenticated, but GitHub does not provide shell access.
# Below, there should be one TERM entry for each termtype that is colorizable TERM ansi TERM color_xterm TERM color-xterm TERM con132x25 TERM con132x30 TERM con132x43 TERM con132x60 TERM con80x25 TERM con80x28 TERM con80x30 TERM con80x43 TERM con80x50 TERM con80x60 TERM cons25 TERM console TERM cygwin TERM dtterm TERM dvtm TERM dvtm-256color TERM Eterm TERM eterm-color TERM fbterm TERM gnome TERM gnome-256color TERM jfbterm TERM konsole TERM konsole-256color TERM kterm TERM linux TERM linux-c TERM mach-color TERM mlterm TERM nxterm TERM putty TERM putty-256color TERM rxvt TERM rxvt-256color TERM rxvt-cygwin TERM rxvt-cygwin-native TERM rxvt-unicode TERM rxvt-unicode256 TERM rxvt-unicode-256color TERM screen TERM screen-16color TERM screen-16color-bce TERM screen-16color-s TERM screen-16color-bce-s TERM screen-256color TERM screen-256color-bce TERM screen-256color-s TERM screen-256color-bce-s TERM screen-256color-italic TERM screen-bce TERM screen-w TERM screen.linux TERM screen.xterm-256color TERM screen.xterm-new TERM st TERM st-meta TERM st-256color TERM st-meta-256color TERM vt100 TERM xterm TERM xterm-new TERM xterm-16color TERM xterm-256color TERM xterm-256color-italic TERM xterm-88color TERM xterm-color TERM xterm-debian TERM xterm-termite
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output) EIGHTBIT 1
############################################################################# # Below are the color init strings for the basic file types. A color init # string consists of one or more of the following numeric codes: # # Attribute codes: # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed # Text color codes: # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white # Background color codes: # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white # # NOTES: # - See http://www.oreilly.com/catalog/wdnut/excerpt/color_names.html # - Color combinations # ANSI Color code Solarized Notes Universal SolDark SolLight # ~~~~~~~~~~~~~~~ ~~~~~~~~~ ~~~~~ ~~~~~~~~~ ~~~~~~~ ~~~~~~~~ # 00 none NORMAL, FILE <SAME> <SAME> # 30 black base02 # 01;30 bright black base03 bg of SolDark # 31 red red docs & mm src <SAME> <SAME> # 01;31 bright red orange EXEC <SAME> <SAME> # 32 green green editable text <SAME> <SAME> # 01;32 bright green base01 unimportant text <SAME> # 33 yellow yellow unclear in light bg multimedia <SAME> <SAME> # 01;33 bright yellow base00 fg of SolLight unimportant non-text # 34 blue blue unclear in dark bg user customized <SAME> <SAME> # 01;34 bright blue base0 fg in SolDark unimportant text # 35 magenta magenta LINK <SAME> <SAME> # 01;35 bright magenta violet archive/compressed <SAME> <SAME> # 36 cyan cyan DIR <SAME> <SAME> # 01;36 bright cyan base1 unimportant non-text <SAME> # 37 white base2 # 01;37 bright white base3 bg in SolLight # 05;37;41 unclear in Putty dark
### By file type
# global default NORMAL 00 # normal file FILE 00 # directory DIR 34 # 777 directory OTHER_WRITABLE 34;40 # symbolic link LINK 35
# pipe, socket, block device, character device (blue bg) FIFO 30;44 SOCK 35;44 DOOR 35;44 # Solaris 2.5 and later BLK 33;44 CHR 37;44
############################################################################# ### By file attributes
# Orphaned symlinks (blinking white on red) # Blink may or may not work (works on iTerm dark or light, and Putty dark) ORPHAN 05;37;41 # ... and the files that orphaned symlinks point to (blinking white on red) MISSING 05;37;41
############################################################################# ### By extension
# List any file extensions like '.gz' or '.tar' that you would like ls # to colorize below. Put the extension, a space, and the color init string. # (and any comments you want to add after a '#')
### Text formats
# Text that we can edit with a regular editor .txt 32 .org 32 .md 32 .mkd 32
############################################################################# # Your customizations
# Unimportant text files # For universal scheme, use brightgreen 01;32 # For optimal on light bg (but too prominent on dark bg), use white 01;34 .log 01;32 *~ 01;32 *# 01;32 #.log 01;34 #*~ 01;34 #*# 01;34
# The brightmagenta (Solarized: purple) color is free for you to use for your # custom file type .gpg 34 .gpg 34 .pgp 34 .asc 34 .3des 34 .aes 34 .enc 34 .sqlite 34
# enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval"$(dircolors -b ~/.dircolors)" || eval"$(dircolors -b)" aliasls='ls --color=auto' #alias dir='dir --color=auto' #alias vdir='vdir --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' fi # some more ls aliases alias ll='ls -alF' alias la='ls -A' alias l='ls -CF'
CREATE TABLE table_a ( id int, name string comment '姓名',) comment '表A' PARTITIONED BY (dt string) ROW format delimited fields terminated by '\t' lines terminated by '\n' stored as textfile;
现在新建一个表B,建表语句和表A完全一样,把表A的数据导入到表B,可以这么做:
1 2
INSERT OVERWRITE TABLE table_b partition(dt) select * from table_a
alter table table_name partition(dt='20151014') rename to partition(dt='20151014old');
删除表
1
drop table if exists table_name;
删除/添加分区
1 2 3
alter table table_name drop partition(dt='20151014'); alter table table_name add if not exists partition(dt='20151018'); alter table table_name add if not exists partition(dt<'20151018'); # 批量删除分区
清空表数据
1
insert overwrite table table_name select * from table_name where 1=0;
删除指定条件的数据
1 2 3 4
# 把Hive表中link_end_date字段为'2099-12-31'的数据删掉,即只要不等于这个值就再插回源表中 insert overwrite table ap_fuwu_tb_complaint_his select * from ap_fuwu_tb_complaint_his where link_end_date<>'2099-12-31';
将数据插入到指定分区
1 2 3
alter table table_name add if not exists partition(dt='20151021old'); insert overwrite table table_name partition(dt='20151021old') SELECT * FROM table_name WHERE dt='20151021';
注意: 如果列不等,则把*换成对应的列。
重命名列名
1 2 3 4 5 6 7 8
alter table table_name CHANGE old_col_name new_col_name field_type;
默认情况下,dict通过key迭代。也可以通过value来迭代:for value in d.itervalues()。也可以同时迭代key和value:for k, v in d.iteritems()。 所以,只要判断一个对象是可迭代对象就可以使用for ... in这种循环,通过collections模块的Iterable类型判断:
Help on built-in function range in module __builtin__:
range(...) range(stop) -> list of integers range(start, stop[, step]) -> list of integers Return a list containing an arithmetic progression of integers. range(i, j) returns [i, i+1, i+2, ..., j-1]; start (!) defaults to 0. When step is given, it specifies the increment (or decrement). For example, range(4) returns [0, 1, 2, 3]. The end point is omitted! These are exactly the valid indices for a list of 4 elements. (END)