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

Fix build error. #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ gradle-wrapper.properties
gradle-wrapper.jar
target
*~
*.patch
*.patch
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ ext {
// because Apple has done heavy modification to the JVM and JDK every version
javaHomeInclude = "/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers"
javaHomeIncludeOs = "/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers"
libjvmLibraryString = "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libserver.dylib"
//libjvmLibraryString = "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libserver.dylib"
libjvmLibraryString = "/System/Library/Frameworks/JavaVM.framework/Versions/Current/JavaVM"
libGTestName = "/libgtest.dylib"
}

// this should be set to the directory of JNI generated headers
if (!project.hasProperty('jniIncludeDir')) {
//if (!project.hasProperty('jniIncludeDir')) {
jniIncludeDir = "src/main/native/generated"
}
//}
if (!project.hasProperty('googleTestDir')) {
googleTestDir = "target/gtest-1.7.0"
}
Expand Down Expand Up @@ -183,8 +184,8 @@ sources {
*/
binaries.all {
if (toolChain in Gcc) {
cCompiler.args "-Wall", "-Werror", "-fvisibility=hidden", "-std=gnu99"
cppCompiler.args "-Wall", "-Werror", "-fvisibility=hidden", "-fvisibility-inlines-hidden"
cCompiler.args "-Wall", "-Wno-deprecated-declarations", "-Werror", "-fvisibility=hidden", "-std=gnu99"
cppCompiler.args "-Wall", "-Wno-deprecated-declarations", "-Werror", "-fvisibility=hidden", "-fvisibility-inlines-hidden"

lib library: 'jvm', linkage: 'shared'
if (OperatingSystem.current().windows) {
Expand Down
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@
<arg value="gradlew" />
<arg value="hbase" />
<arg value="perftest" />
<arg value="example_async" />
<arg value="--info" />
<arg value="--debug" />
<arg value="--stacktrace" />
<arg value="-PbuildDir=${project.build.directory}/gradle" />
<arg value="-PjniIncludeDir=${project.build.directory}/native/javah" />
</exec>
Expand Down
1 change: 1 addition & 0 deletions src/main/native/common/hbase_log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
#include <sys/unistd.h>
Expand Down
2 changes: 1 addition & 1 deletion src/test/native/common/test_types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ TaskRunner::Stop() {
void*
TaskRunner::ThreadFunction(void* arg) {
TaskRunner* runner = (TaskRunner*) (arg);
runner->tid_ = (uint32_t) (pthread_self());
runner->tid_ = pthread_self();
return runner->Run();
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/native/common/test_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ class TaskRunner {
protected:
volatile bool Running() { return !stop_; }

uint32_t Id() { return tid_; }
pthread_t Id() { return tid_; }

virtual void* Run() = 0;

private:
uint32_t tid_;
pthread_t tid_;

volatile bool stop_;

Expand Down
4 changes: 2 additions & 2 deletions src/test/native/perftest/ops_runner.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ class OpsRunner : public TaskRunner {
keyPrefix_(keyPrefix),
valueLen_(valueSize),
getsSent_(0),
maxGets_(numOps_*(1.0-(putPercent/100.0))),
maxGets_(numOps_*(1-(putPercent/100))),
putsSent_(0),
maxPuts_(numOps_-maxGets_),
putWeight_(putPercent/100.0),
putWeight_(putPercent/100),
checkRead_(checkRead),
paused_(false),
semaphore_(new Semaphore(maxPendingRPCsPerThread)),
Expand Down