-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from tushengxia/main
Init repo directories and Move hbase repo
- Loading branch information
Showing
571 changed files
with
117,783 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
target/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# hbase-trie-index | ||
|
||
|
||
|
||
Introduction | ||
============ | ||
The trie index library is used to accelerate HBase Data Block selection. By using Succinct Data Structure instead of ArrayList, trie index costs less memory and performs more efficiently. The trie index library is based on the original APIs of Apache [HBase 2.2.3](https://github.com/apache/hbase/tree/rel/2.2.3). | ||
|
||
|
||
|
||
|
||
Building And Packageing | ||
==================== | ||
|
||
(1) Build the project: | ||
|
||
mvn clean package | ||
|
||
|
||
Contribution Guidelines | ||
======== | ||
|
||
Track the bugs and feature requests via GitHub [issues]. | ||
|
||
More Information | ||
======== | ||
|
||
For further assistance, send an email to [email protected]. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.huawei</groupId> | ||
<artifactId>fake-tries-index-pack</artifactId> | ||
<version>2.2.3</version> | ||
</project> |
29 changes: 29 additions & 0 deletions
29
.../fake-tries-index-pack/src/main/java/com/huawei/boostkit/hbase/index/AllocatedMemory.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. | ||
*/ | ||
package com.huawei.boostkit.hbase.index; | ||
|
||
import java.nio.ByteBuffer; | ||
|
||
/** | ||
* Allocated memory by unsafe | ||
* | ||
* @since 2021.09 | ||
*/ | ||
public class AllocatedMemory { | ||
public ByteBuffer getBuf() { | ||
return null; | ||
} | ||
|
||
public void retain() { | ||
} | ||
|
||
public void release() { | ||
} | ||
|
||
public int refCnt() { | ||
return 0; | ||
} | ||
|
||
public int size() {return 0;} | ||
} |
14 changes: 14 additions & 0 deletions
14
...dex-pack/src/main/java/com/huawei/boostkit/hbase/index/IllegalMemoryRequestException.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. | ||
*/ | ||
package com.huawei.boostkit.hbase.index; | ||
|
||
/** | ||
* Illegal Memory Request Exception | ||
* | ||
* @since 2021.09 | ||
*/ | ||
public class IllegalMemoryRequestException extends Exception { | ||
public IllegalMemoryRequestException(long requestMemorySize) { | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...index-pack/src/main/java/com/huawei/boostkit/hbase/index/InsufficientMemoryException.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. | ||
*/ | ||
package com.huawei.boostkit.hbase.index; | ||
|
||
/** | ||
* Insufficient memory exception | ||
* | ||
* @since 2021.09 | ||
*/ | ||
public class InsufficientMemoryException extends Exception { | ||
public InsufficientMemoryException(long memoryGap) { | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...ake-tries-index-pack/src/main/java/com/huawei/boostkit/hbase/index/LoudsTriesService.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. | ||
*/ | ||
package com.huawei.boostkit.hbase.index; | ||
|
||
import java.io.DataOutput; | ||
import java.io.IOException; | ||
import java.nio.ByteBuffer; | ||
import java.util.List; | ||
|
||
/** | ||
* Louds Tries Map service | ||
* | ||
* @since 2021.09 | ||
*/ | ||
public class LoudsTriesService { | ||
|
||
public static void build(List<byte[]> keys, long[] offsets, int[] lengths, DataOutput out) throws IOException { | ||
} | ||
|
||
public static ValueInfo get(ByteBuffer buff, byte[] key, int offset, int length) { | ||
return null; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...ies-index-pack/src/main/java/com/huawei/boostkit/hbase/index/NativeMaxLimitAllocator.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. | ||
*/ | ||
package com.huawei.boostkit.hbase.index; | ||
|
||
/** | ||
* Direct memory allocator with maximum memory | ||
* memory is free manually | ||
* | ||
* @since 2021.09 | ||
*/ | ||
public class NativeMaxLimitAllocator { | ||
|
||
|
||
public NativeMaxLimitAllocator(long maxMemorySize) { | ||
} | ||
|
||
public AllocatedMemory allocate(int size) throws InsufficientMemoryException, IllegalMemoryRequestException { | ||
return null; | ||
} | ||
|
||
public long getMaxMemory() { | ||
return 0; | ||
} | ||
|
||
public long getMemoryUsed() { | ||
return 0; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
.../fake-tries-index-pack/src/main/java/com/huawei/boostkit/hbase/index/OffheapLruCache.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.huawei.boostkit.hbase.index; | ||
|
||
public class OffheapLruCache<KEYTYPE> { | ||
public OffheapLruCache(long maxMemorySize, float reserveRatio, long evaluatedBlockSize) { | ||
} | ||
|
||
public void putCache(KEYTYPE cacheKey, OffheapReplaceableCache cacheable) | ||
throws InsufficientMemoryException, IllegalMemoryRequestException { | ||
} | ||
|
||
public OffheapReplaceableCache getCache(KEYTYPE cacheKey) { | ||
return null; | ||
} | ||
|
||
public boolean containsKey(KEYTYPE cacheKey) { | ||
return false; | ||
} | ||
|
||
public void returnCache(OffheapReplaceableCache value) { | ||
} | ||
|
||
public long getMaxMemory() { | ||
return 0; | ||
} | ||
|
||
public void shutdown() { | ||
} | ||
public void activateEvictThread(){} | ||
} |
8 changes: 8 additions & 0 deletions
8
...ies-index-pack/src/main/java/com/huawei/boostkit/hbase/index/OffheapReplaceableCache.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.huawei.boostkit.hbase.index; | ||
|
||
public interface OffheapReplaceableCache { | ||
void retain(); | ||
void release(); | ||
int dataSize(); | ||
OffheapReplaceableCache replace(AllocatedMemory allocate); | ||
} |
19 changes: 19 additions & 0 deletions
19
...-index/fake-tries-index-pack/src/main/java/com/huawei/boostkit/hbase/index/ValueInfo.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. | ||
*/ | ||
package com.huawei.boostkit.hbase.index; | ||
|
||
/** | ||
* Value info | ||
* | ||
* @since 2021.09 | ||
*/ | ||
public class ValueInfo { | ||
public final long blockOffset; | ||
public final int blockLength; | ||
|
||
public ValueInfo(long blockOffset, int blockLength) { | ||
this.blockOffset = blockOffset; | ||
this.blockLength = blockLength; | ||
} | ||
} |
Oops, something went wrong.