Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the prefix of packages to io.pixelsdb #22

Merged
merged 2 commits into from
Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions cpp/PixelsCacheReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
#include "MemoryMappedFile.h"
using namespace std;

JNIEXPORT jbyteArray JNICALL Java_cn_edu_ruc_iir_pixels_cache_NativePixelsCacheReader_get
JNIEXPORT jbyteArray JNICALL Java_io_pixelsdb_pixels_cache_NativePixelsCacheReader_get
(JNIEnv *env, jclass cls, jlong blockId, jshort rowGroupId, jshort columnId)
{
jbyteArray res;
return res;
}


JNIEXPORT jbyteArray JNICALL Java_cn_edu_ruc_iir_pixels_cache_NativePixelsCacheReader_sch
JNIEXPORT jbyteArray JNICALL Java_io_pixelsdb_pixels_cache_NativePixelsCacheReader_sch
(JNIEnv *env, jclass cls, jlong blockId, jshort rowGroupId, jshort columnId)
{
jbyteArray res;
Expand Down
14 changes: 7 additions & 7 deletions cpp/PixelsCacheReader.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pixels-cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>pixels</artifactId>
<groupId>cn.edu.ruc.iir</groupId>
<groupId>io.pixelsdb</groupId>
<version>0.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand All @@ -18,7 +18,7 @@

<dependencies>
<dependency>
<groupId>cn.edu.ruc.iir</groupId>
<groupId>io.pixelsdb</groupId>
<artifactId>pixels-common</artifactId>
<optional>true</optional>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import com.facebook.presto.spi.HostAddress;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import cn.edu.ruc.iir.pixels.cache.mq.MappedBusMessage;
import cn.edu.ruc.iir.pixels.common.utils.Constants;
import org.apache.commons.compress.utils.CharsetNames;
import io.pixelsdb.pixels.cache.mq.MappedBusMessage;

import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.Arrays;
import java.util.Objects;

import static com.google.common.base.MoreObjects.toStringHelper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import java.util.ArrayList;
import java.util.Comparator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import javax.annotation.concurrent.NotThreadSafe;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/*
* This class was inspired from an entry in Bryce Nyeggen's blog
*/
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import sun.misc.Unsafe;
import sun.nio.ch.FileChannelImpl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import cn.edu.ruc.iir.pixels.common.utils.ConfigFactory;
import io.pixelsdb.pixels.common.utils.ConfigFactory;

/**
* pixels
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import java.nio.ByteBuffer;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import java.nio.ByteBuffer;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import java.nio.ByteBuffer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import cn.edu.ruc.iir.pixels.common.utils.Constants;
import io.pixelsdb.pixels.common.utils.Constants;
import org.apache.directory.api.util.Strings;

import java.nio.charset.StandardCharsets;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package cn.edu.ruc.iir.pixels.cache;

import cn.edu.ruc.iir.pixels.common.exception.FSException;
import cn.edu.ruc.iir.pixels.common.metadata.domain.Compact;
import cn.edu.ruc.iir.pixels.common.metadata.domain.Layout;
import cn.edu.ruc.iir.pixels.common.utils.Constants;
import cn.edu.ruc.iir.pixels.common.utils.EtcdUtil;
import cn.edu.ruc.iir.pixels.core.PixelsProto;
package io.pixelsdb.pixels.cache;

import io.pixelsdb.pixels.common.exception.FSException;
import io.pixelsdb.pixels.common.metadata.domain.Compact;
import io.pixelsdb.pixels.common.metadata.domain.Layout;
import io.pixelsdb.pixels.common.utils.Constants;
import io.pixelsdb.pixels.common.utils.EtcdUtil;
import io.pixelsdb.pixels.core.PixelsProto;
import com.coreos.jetcd.data.KeyValue;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import cn.edu.ruc.iir.pixels.common.exception.FSException;
import cn.edu.ruc.iir.pixels.common.physical.PhysicalReader;
import cn.edu.ruc.iir.pixels.common.physical.PhysicalReaderUtil;
import cn.edu.ruc.iir.pixels.core.PixelsProto;
import io.pixelsdb.pixels.common.exception.FSException;
import io.pixelsdb.pixels.common.physical.PhysicalReader;
import io.pixelsdb.pixels.common.physical.PhysicalReaderUtil;
import io.pixelsdb.pixels.core.PixelsProto;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import java.nio.ByteBuffer;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.ruc.iir.pixels.cache;
package io.pixelsdb.pixels.cache;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.edu.ruc.iir.pixels.cache.mq;
package io.pixelsdb.pixels.cache.mq;

/**
* Class with constants.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.edu.ruc.iir.pixels.cache.mq;
package io.pixelsdb.pixels.cache.mq;

import cn.edu.ruc.iir.pixels.cache.MemoryMappedFile;
import io.pixelsdb.pixels.cache.MemoryMappedFile;

/**
* Interface for messages that can be serialized to the bus.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.edu.ruc.iir.pixels.cache.mq;
package io.pixelsdb.pixels.cache.mq;

import cn.edu.ruc.iir.pixels.cache.MemoryMappedFile;
import cn.edu.ruc.iir.pixels.cache.mq.MappedBusConstants.Commit;
import cn.edu.ruc.iir.pixels.cache.mq.MappedBusConstants.Length;
import cn.edu.ruc.iir.pixels.cache.mq.MappedBusConstants.Rollback;
import cn.edu.ruc.iir.pixels.cache.mq.MappedBusConstants.Structure;
import io.pixelsdb.pixels.cache.MemoryMappedFile;

import java.io.EOFException;
import java.io.IOException;
Expand Down Expand Up @@ -71,7 +67,7 @@ public class MappedBusReader

private MemoryMappedFile mem;

private long limit = Structure.Data;
private long limit = MappedBusConstants.Structure.Data;

private long initialLimit;

Expand Down Expand Up @@ -113,7 +109,7 @@ public void open()
{
throw new IOException("Unable to open the file: " + fileName, e);
}
initialLimit = mem.getLongVolatile(Structure.Limit);
initialLimit = mem.getLongVolatile(MappedBusConstants.Structure.Limit);
}

/**
Expand Down Expand Up @@ -145,20 +141,20 @@ public boolean next()
{
throw new EOFException("End of file was reached");
}
if (mem.getLongVolatile(Structure.Limit) <= limit)
if (mem.getLongVolatile(MappedBusConstants.Structure.Limit) <= limit)
{
return false;
}
byte commit = mem.getByteVolatile(limit);
byte rollback = mem.getByteVolatile(limit + Length.Commit);
if (rollback == Rollback.Set)
byte rollback = mem.getByteVolatile(limit + MappedBusConstants.Length.Commit);
if (rollback == MappedBusConstants.Rollback.Set)
{
limit += Length.RecordHeader + recordSize;
limit += MappedBusConstants.Length.RecordHeader + recordSize;
timeoutCounter = 0;
timerStart = 0;
return false;
}
if (commit == Commit.Set)
if (commit == MappedBusConstants.Commit.Set)
{
timeoutCounter = 0;
timerStart = 0;
Expand All @@ -175,8 +171,8 @@ public boolean next()
{
if (System.currentTimeMillis() - timerStart >= maxTimeout)
{
mem.putByteVolatile(limit + Length.Commit, Rollback.Set);
limit += Length.RecordHeader + recordSize;
mem.putByteVolatile(limit + MappedBusConstants.Length.Commit, MappedBusConstants.Rollback.Set);
limit += MappedBusConstants.Length.RecordHeader + recordSize;
timeoutCounter = 0;
timerStart = 0;
return false;
Expand All @@ -194,9 +190,9 @@ public boolean next()
public int readType()
{
typeRead = true;
limit += Length.StatusFlags;
limit += MappedBusConstants.Length.StatusFlags;
int type = mem.getInt(limit);
limit += Length.Metadata;
limit += MappedBusConstants.Length.Metadata;
return type;
}

Expand Down Expand Up @@ -227,9 +223,9 @@ public MappedBusMessage readMessage(MappedBusMessage message)
*/
public int readBuffer(byte[] dst, int offset)
{
limit += Length.StatusFlags;
limit += MappedBusConstants.Length.StatusFlags;
int length = mem.getInt(limit);
limit += Length.Metadata;
limit += MappedBusConstants.Length.Metadata;
mem.getBytes(limit, dst, offset, length);
limit += recordSize;
return length;
Expand Down
Loading