自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

[leetcode] DungeonGame

package temworkingarea;/** * * The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. ...

2015-02-25 17:45:10 225

hbase分页功能的几种实现方案

hbase分页功能的几种实现方案。分页功能是线上系统的常用功能,对hbase,有以下几个方案可以选择(抛砖引玉)。假设要查第N页,1页大小为M1 client分页,scan查到N*M条,过滤掉N*M-M条,返回M条。对于M,N较小时比较适合。2 自定义Filter,该filter可以传递offset(server端需要过滤的记录条数),在server端分页,注意,跨不同的r...

2015-01-13 23:52:57 807

[leetcode] CompareVersionNumbers

package temworkingarea;import leetcode.tag.JavaEye;@JavaEye/** * * Compare two version numbers version1 and version1. * If version1 > version2 return 1, if version1 < version2 return ...

2015-01-10 10:05:38 260

simplehbase v0.98.1开始支持hbase0.98

[url]https://github.com/zhang-xzhi/simplehbase/[/url][url]https://github.com/zhang-xzhi/simplehbase/wiki[/url]simplehbase的主要功能数据类型映射:java类型和hbase的bytes之间的数据转换。简单操作封装:封装了hbase的put,get,sca...

2014-12-29 21:52:48 188

simplehbase v0.98.1开始支持hbase0.98

[url]https://github.com/zhang-xzhi/simplehbase/[/url][url]https://github.com/zhang-xzhi/simplehbase/wiki[/url]simplehbase的主要功能数据类型映射:java类型和hbase的bytes之间的数据转换。简单操作封装:封装了hbase的put,get,sca...

2014-12-29 21:48:54 111

[leetcode] SameTree

/** * * Given two binary trees, write a function to check if they are equal or not. * * Two binary trees are considered equal if they are structurally identical and the nodes have the same v...

2014-12-16 00:20:28 103

[leetcode] PalindromeNumber

/** * Determine whether an integer is a palindrome. Do this without extra space. * */public class PalindromeNumber { public class Solution { public boolean isPalindrome(int x) { ...

2014-12-16 00:18:12 98

hbase轻量级中间件simplehbase v1.0简介

[url]https://github.com/zhang-xzhi/simplehbase/[/url][url]https://github.com/zhang-xzhi/simplehbase/wiki[/url]simplehbase的主要功能数据类型映射:java类型和hbase的bytes之间的数据转换。简单操作封装:封装了hbase的put,get,sca...

2014-12-13 18:56:15 122

hbase轻量级中间件simplehbase v1.0简介

[url]https://github.com/zhang-xzhi/simplehbase/[/url][url]https://github.com/zhang-xzhi/simplehbase/wiki[/url]simplehbase的主要功能数据类型映射:java类型和hbase的bytes之间的数据转换。简单操作封装:封装了hbase的put,get,sca...

2014-12-13 18:55:09 128

hbase put UML图

create Htable[img]http://dl2.iteye.com/upload/attachment/0104/3133/8f1aff59-12a6-379b-bc20-70a1d3619909.jpg[/img]put[img]http://dl2.iteye.com/upload/attachment/0104/3141/f2dc3117-d46a-3e46-b058-...

2014-12-11 23:40:15 134

hbase开发问题-PooledHTable多次close导致问题

PooledHTable多次close导致问题PooledHTable close时,调用returnTable(table)[code="java"] private void returnTable(HTableInterface table) throws IOException { // this is the old putTable method renam...

2014-12-11 23:27:10 698

hbase的CoprocessorProtocol及一个简单的通用扩展实现V2

hbase中的CoprocessorProtocol机制.CoprocessorProtocol的原理比较简单,近似于一个mapreduce框架。由client将scan分解为面向多个region的请求,并行发送请求到多个region,然后client做一个reduce的操作,得到最后的结果。先看一个例子,使用hbase的AggregationClient可以做到简单的面向单个...

2014-12-04 18:02:20 117

hbase的CoprocessorProtocol及一个简单的通用扩展实现V2

hbase中的CoprocessorProtocol机制.CoprocessorProtocol的原理比较简单,近似于一个mapreduce框架。由client将scan分解为面向多个region的请求,并行发送请求到多个region,然后client做一个reduce的操作,得到最后的结果。先看一个例子,使用hbase的AggregationClient可以做到简单的面向单个...

2014-12-04 18:00:55 153

hbase 0.94.0 0.94.9 0.94.24 功能不兼容初步分析

hbase 0.94.0 0.94.9 0.94.24 功能不兼容初步分析测试原因:原有的simplehbase count测试代码当hbase从某个集团版本升级后,部分测试代码不通过,怀疑hbase的各个版本有兼容性问题。测试环境:0.94.0 0.94.9 0.94.24使用本机的独立部署hbase。 client 0.94.9测试数据:[cod...

2014-12-04 16:14:11 164

hbase 0.94.0 0.94.9 0.94.24 功能不兼容初步分析

hbase 0.94.0 0.94.9 0.94.24 功能不兼容初步分析测试原因:原有的simplehbase count测试代码当hbase从某个集团版本升级后,部分测试代码不通过,怀疑hbase的各个版本有兼容性问题。测试环境:0.94.0 0.94.9 0.94.24使用本机的独立部署hbase。 client 0.94.9测试数据:[cod...

2014-12-04 16:10:07 126

[leetcode] PascalsTriangle2

/** * * Given an index k, return the kth row of the Pascal's triangle. * * For example, given k = 3, * Return [1,3,3,1]. * * Note: * Could you optimize your algorithm to use only O(...

2014-11-19 17:33:03 138

[leetcode] SingleNumber2

public class Solution { public int singleNumber(int[] A) { int[] tem = new int[32]; for (int a : A) { int x = 1; for (int t = 0...

2014-11-11 20:57:46 103

[leetcode] SearchforaRange

public int[] searchRange(int[] A, int target) { if (A == null || A.length == 0) { return new int[] { -1, -1 }; } int start = start(A, ...

2014-11-11 19:45:30 194

[leetcode] SqrtX

package leetcode;/** * * Implement int sqrt(int x). * * Compute and return the square root of x. * * */public class SqrtX { public static class Solution { public int...

2014-11-05 17:08:05 101

[leetcode] MinimumDepthofBinaryTree

package leetcode;/** * * * Given a binary tree, find its minimum depth. * * The minimum depth is the number of nodes along the shortest path from the root node down to the nearest lea...

2014-11-05 17:05:59 94

[leetcode] SymmetricTree

package t;/** * * Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). * * For example, this binary tree is symmetric: * * 1 * / \...

2014-10-29 12:59:27 69

[leetcode] ValidateBinarySearchTree

package t;import java.util.ArrayList;import java.util.List;/** * * Given a binary tree, determine if it is a valid binary search tree (BST). * * Assume a BST is defined as follows:...

2014-10-29 12:24:02 79

[leetcode] ReverseWordsinaString

package leetcode;import java.util.Stack;/** * * Given an input string, reverse the string word by word. * * For example, * Given s = "the sky is blue", * return "blue is sky the"...

2014-10-26 00:45:03 104

[leetcode] GasStation

/** * * There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. * * You have a car with an unlimited gas tank and it costs cost[i] of gas to travel f...

2014-10-26 00:43:12 73

[leetcode] PathSum

package leetcode;/** * * Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. * * For exam...

2014-10-25 00:08:49 70

[leetcode] PowXN

package leetcode;/** * * Implement pow(x, n). * */public class PowXN { public static class Solution2 { public double pow(double x, int n) { if (n < 0) { ...

2014-10-25 00:07:49 117

[leetcode] PopulatingNextRightPointersinEachNode

package leetcode;import leetcode.tag.NeedStudyMore;@NeedStudyMore/** * * Given a binary tree * * struct TreeLinkNode { * TreeLinkNode *left; * TreeLinkNode *right; * Tr...

2014-10-25 00:03:37 121

[leetcode] RemoveDuplicatesfromSortedList

package leetcode;/** * * Given a sorted linked list, delete all duplicates such that each element appear only once. * * For example, * Given 1->1->2, return 1->2. * Given 1->1->2->3-...

2014-10-25 00:02:18 77

[leetcode] ValidParentheses

package leetcode;import java.util.Stack;/** * * Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. * * The bracket...

2014-10-24 23:24:05 80

simplehbase对JOPO新增xml配置和无配置方式

simplehbase介绍文章如下:[url]https://github.com/zhang-xzhi/simplehbase/wiki/C00-simplehbase-3%E5%88%86%E9%92%9F%E7%AE%80%E4%BB%8B[/url]github[url]https://github.com/zhang-xzhi/simplehbase/[/url][u...

2014-10-24 22:50:18 184

[leetcode] MinimumPathSum

package leetcode;/** * * Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. * * Note: Y...

2014-10-23 23:16:23 74

[leetcode] MergeSortedArray

package leetcode;/** * * Given two sorted integer arrays A and B, merge B into A as one sorted array. * * Note: * You may assume that A has enough space (size that is greater or equal ...

2014-10-23 23:15:19 82

[leetcode] MaximumDepthofBinaryTree

/** * * Given a binary tree, find its maximum depth. * * The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. * * */publi...

2014-10-22 00:56:37 78

[leetcode] FindMinimuminRotatedSortedArray2

/** * * * Follow up for "Find Minimum in Rotated Sorted Array": * What if duplicates are allowed? * * Would this affect the run-time complexity? How and why? * Suppose a sorted array ...

2014-10-22 00:31:25 93

[leetcode] BestTimetoBuyandSellStock

package leetcode;/** * * Say you have an array for which the ith element is the price of a given stock on day i. * * If you were only permitted to complete at most one transaction (ie, b...

2014-10-21 23:24:37 72

[leetcode] SumRoottoLeafNumbers

package leetcode;/** * * Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. * * An example is the root-to-leaf path 1->2->3 which repre...

2014-10-21 23:21:39 76

[leetcode] LinkedListCycle

package leetcode;/** * * Given a linked list, determine if it has a cycle in it. * * Follow up: * Can you solve it without using extra space? * * */public class LinkedListCycle ...

2014-10-19 14:41:04 78

[leetcode] FindMinimuminRotatedSortedArray

package leetcode;/** * Find Minimum in Rotated Sorted Array * * * Suppose a sorted array is rotated at some pivot unknown to you * beforehand. * * (i.e., 0 1 2 4 5 6 7 might become ...

2014-10-19 14:39:55 100

[leetcode] ClimbingStairs

/** * * You are climbing a stair case. It takes n steps to reach to the top. * * Each time you can either climb 1 or 2 steps. * In how many distinct ways can you climb to the top? * ...

2014-10-19 12:00:52 68

[leetcode] BinaryTreePreorderTraversal

package leetcode;import java.util.ArrayList;import java.util.List;import java.util.Stack;/** * * Given a binary tree, return the preorder traversal of its nodes' values. * * Fo...

2014-10-19 11:41:59 82

空空如也

空空如也

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

TA关注的人

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