- 新建QueryBlock
- 预处理(语意分析)
- 获取MetaData
- 获取每个源table的相关结构
- 将视图替换, 重写, 并将其记入view别名
- 检查inputformat
- 保存alias->tab 至QB
- 为子查询获取meta
- 获取目标的相关结构, 目标有两种:表或本地目录
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.Random; | |
public class IntArrayIntersection { | |
/* | |
* O(N+M) | |
*/ | |
public static int[] intersectByLiteration(final int[] lhs, final int[] rhs) { | |
// worst case size for the intersection array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Lock {} | |
class Danger { | |
static { | |
System.out.println("clinit begin..."); | |
try {Thread.sleep(2000);} catch (Exception e) {} | |
synchronized (Lock.class) { System.out.println("clinit done!");} | |
} | |
} | |
public class Hang { | |
public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Field; | |
import java.util.Random; | |
import sun.misc.Unsafe; | |
public class GroupVarInt { | |
private final static int UINT24_MAX = ((2<<23) - 1); | |
private final static int UINT16_MAX = ((2<<15) - 1); | |
private final static int UINT8_MAX = ((2<<7) -1); | |
private static final long BYTE_ARRAY_OFFSET; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.concurrent.Callable; | |
import java.util.concurrent.Future; | |
import java.util.concurrent.FutureTask; | |
import java.util.concurrent.PriorityBlockingQueue; | |
import java.util.concurrent.RejectedExecutionHandler; | |
import java.util.concurrent.RunnableFuture; | |
import java.util.concurrent.ThreadFactory; | |
import java.util.concurrent.ThreadPoolExecutor; | |
import java.util.concurrent.TimeUnit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <time.h> | |
#define NANOSECS_PER_SEC 1000000000 | |
pthread_mutex_t lock; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.file.DirectoryStream; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.LinkOption; | |
import java.nio.file.Paths; | |
import java.util.List; | |
import java.util.ArrayList; | |
import java.util.concurrent.ForkJoinPool; | |
import java.util.concurrent.RecursiveTask; | |
import java.io.IOException; |
Java应用中经常用ByteBuffer.allocateDirect()
或者Unsafe.allocateMemory()
分配一段内存。 MAT等内存查看器看不到native的内存, 所以需要借助gdb等工具来查看.
ByteBuffer bb = ByteBuffer.allocateDirect(capacity)
.order(ByteOrder.nativeOrder());
这种ByteBuffer
可以得到它的起始内存地址
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tajo> select count(1) from supplier; | |
Progress: 50%, response time: 1.033 sec | |
Progress: 100%, response time: 1.481 sec | |
SLF4J: Class path contains multiple SLF4J bindings. | |
SLF4J: Found binding in [jar:file:/home/mzhou/tajo/tajo-0.2.0-SNAPSHOT/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] | |
SLF4J: Found binding in [jar:file:/home/mzhou/hadoop/hadoop-2.0.5-alpha/share/hadoop/common/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] | |
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. | |
2013-12-05 20:28:33,330 WARN storage.AbstractStorageManager (AbstractStorageManager.java:<init>(85)) - does not support block metadata. ('dfs.datanode.hdfs-blocks-metadata.enabled') | |
final state: QUERY_SUCCEEDED, init time: 0.135 sec, response time: 1.481 sec | |
result: hdfs://172.16.19.32:8020/tajo-mzhou/staging/q_1386302792972_0002/RESULT, 1 rows (8 B) |