数据研发工作阶段性总结:(2015-12-21 至 2016-08-04)

作者:JerryXia | 发表于 , 阅读 (30)
前言中午在看书,看着看着就不自觉地想起来自己从入职至今的工作情况了。
在工作的过程中,有过对工作性质的质疑、对自己能力的不自信、对前景的担忧,想想还是挺好玩的。趁着脑子比较飘忽,总结一下工作的情况吧。
总结的角度主要站在集群管理员的角度。
工作2015年12月21日,我以校招生的身份入职,先有共三个月试用(+实习)期。工作的初期定位是研发,负责小组的部分内部系统开发,以数据流的处理为主。
集群迁移:前两周的时间熟悉环境。熟悉过后,赶上大数据集群迁移,由于之前自身对类似集群运维的工作比较熟悉,因此临时参与到数据集群迁移的工作。半个多月的时间中,进行了新集群的搭建、数据迁移和业务迁移。迁移过程主要由python来主导,我来辅助。集群迁移的感受就是要细心、细心、再细心,然后再加一点耐心。因为集群规模不大而且是机房内部迁移,不存在太多的技术问题。需要注意的就是目录权限、业务平滑迁移、新老集群数据每日同步等细节。由于迁移的过程对其它同事来说算是无感迁移,因此大家还是很高兴的,至少不用自己动业务了。
Impala:集群迁移完成后,有一小段时间,负责了部分的业务开发内容,主要是提供数据源相...阅读全文

Leetcode:206. Reverse Linked List

作者:JerryXia | 发表于 , 阅读 (27)
public class Solution {public ListNode reverseList(ListNode head) {if(head != null) {ListNode p = head; //指向当前元素ListNode frontier; //p的下一个元素,每次循环都会反转到head处while(p != null && p.next != null) {frontier = p.next;p.next = p.next.next;frontier.next = head;head = frontier;}...阅读全文

Leetcode:328. Odd Even Linked List

作者:JerryXia | 发表于 , 阅读 (21)
0X01 题目Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.
You should try to do it in place. The program should run in O(1) space complexity and O(nodes) time complexity.
Example::Given 1->2->3->4->5->NULL,Return 1->3->5->2->4->NULL.
...阅读全文

Leetcode:237. Delete Node in a Linked List

作者:JerryXia | 发表于 , 阅读 (22)
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.
Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value 3, the linked list should become 1 -> 2 -> 4 after calling your function.
0X02 题意题目的要求就是删除链表中的一个元素,给的数据结构是一个单链表。
public class ListNode {int val;ListNode next;ListNode(int x) {val = x;}}注意判断一下需要删除的节点是否为空、该节点是否是最后一个节点即可。
0X03 题解1.解法一(Dante:Java)比较直观的一个解法,判断一下需要删除的节点是否为空、该节点是否是最后一个节点即可。
时间复杂度O(N)
空...阅读全文

Leetcode:274. H-Index

作者:JerryXia | 发表于 , 阅读 (23)
Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher’s h-index.
According to the definition of h-index on Wikipedia: “A scientist has index h if h of his/her N papers have at least h citations each, and the other N − h papers have no more than h citations each.”
For example, given citations = [3, 0, 6, 1, 5], which means the researcher has 5 papers in total and each of them had received 3, 0, 6, 1, 5 citations respect...阅读全文