Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
534 commits
Select commit Hold shift + click to select a range
14065ef
UPDATE:Hadoop 2.7.1
Jackson1992 Mar 15, 2016
aeff40c
Update: Hadoop 2.7.1
Jackson1992 Mar 15, 2016
d213313
Update: Hadoop 2.7.1
Jackson1992 Mar 15, 2016
048db58
Update: Hadoop 2.7.1
Jackson1992 Mar 15, 2016
21d1f0b
Update: Hadoop 2.7.1
Jackson1992 Mar 15, 2016
ad1be8d
modify to adjust to hdfs
Jackson1992 Mar 15, 2016
f926f0d
modify to adjust to hdfs
Jackson1992 Mar 15, 2016
b2da789
support to start cluster from any node
cs-wang Mar 15, 2016
859b265
support to start cluster from any node
cs-wang Mar 15, 2016
f753352
support to start cluster from any node
cs-wang Mar 15, 2016
db6190a
support to start claims on any node in cluster
cs-wang Mar 16, 2016
deae9c2
support to start claims on any node in cluster
cs-wang Mar 16, 2016
0104fb2
support to start claims on any node in cluster
cs-wang Mar 16, 2016
6bfd2ee
announce sending message
fzhedu Mar 17, 2016
5a80920
Update: hadoop 2.7.1
Jackson1992 Mar 18, 2016
d7bf64c
Update: hadoop 2.7.1
Jackson1992 Mar 18, 2016
c08c1c8
config and deploy improvement
cs-wang Mar 20, 2016
ef178c7
config and deploy improvement
cs-wang Mar 20, 2016
e7c6ffc
config and deploy improvement
cs-wang Mar 20, 2016
8d2ba04
deploy improvement
cs-wang Mar 20, 2016
f51347a
deploy improvement
cs-wang Mar 20, 2016
d30ebb8
deploy improvement
cs-wang Mar 20, 2016
17999ee
solve bug 1. in logical_cross_join right broast,2. exchange sender so…
fzhedu Mar 21, 2016
b5f037b
solve bug 1. in logical_cross_join right broast,2. exchange sender so…
fzhedu Mar 21, 2016
b86ab60
PortManager useless code delete
cs-wang Mar 21, 2016
8e22b07
PortManager useless code delete
cs-wang Mar 21, 2016
a9f74cc
PortManager useless code delete
cs-wang Mar 21, 2016
c9252ac
Merge branch 'master-new-hdfs' into scripts
cs-wang Mar 21, 2016
be85432
Merge branch 'master-new-hdfs' into scripts
cs-wang Mar 21, 2016
d7cb89a
Merge branch 'master-new-hdfs' into scripts
cs-wang Mar 21, 2016
8774839
should reset block_for_asking in nest loop's next()
fzhedu Mar 22, 2016
312b976
should reset block_for_asking in nest loop's next()
fzhedu Mar 22, 2016
af300ba
t push origin for_auto_testMerge branch 'FishYoung-for_auto_test' int…
fzhedu Mar 22, 2016
cb0cc77
t push origin for_auto_testMerge branch 'FishYoung-for_auto_test' int…
fzhedu Mar 22, 2016
e7e6b32
Merge branch 'master-new-hdfs' of https://github.com/Jackson1992/CLAI…
fzhedu Mar 22, 2016
7b83822
Merge branch 'master-new-hdfs' of https://github.com/Jackson1992/CLAI…
fzhedu Mar 22, 2016
5aeaafd
Merge branch 'bug_multiple_instance' into for_auto_test
fzhedu Mar 22, 2016
1799bd5
Merge branch 'bug_multiple_instance' into for_auto_test
fzhedu Mar 22, 2016
a6bad79
New Loader with new FileHandle, compiler has no complaint
yukai2014 Mar 22, 2016
d862e22
scripts improvement
cs-wang Mar 22, 2016
61b51d4
scripts improvement
cs-wang Mar 22, 2016
845fcd0
scripts improvement
cs-wang Mar 22, 2016
57fd432
t push origin for_auto_testMerge branch 'Jackson1992-master-new-hdfs'…
fzhedu Mar 22, 2016
8c70ceb
t push origin for_auto_testMerge branch 'Jackson1992-master-new-hdfs'…
fzhedu Mar 22, 2016
febe9f3
Merge branch 'scripts' of https://github.com/cs-wang/CLAIMS into cs-w…
fzhedu Mar 22, 2016
3cf6f16
Merge branch 'scripts' of https://github.com/cs-wang/CLAIMS into cs-w…
fzhedu Mar 22, 2016
32e6700
Merge branch 'scripts' of https://github.com/cs-wang/CLAIMS into cs-w…
fzhedu Mar 22, 2016
7c17e94
t push origin for_auto_testMerge branch 'cs-wang-scripts' into for_au…
fzhedu Mar 22, 2016
cd3c3dd
t push origin for_auto_testMerge branch 'cs-wang-scripts' into for_au…
fzhedu Mar 22, 2016
d28c6c5
t push origin for_auto_testMerge branch 'cs-wang-scripts' into for_au…
fzhedu Mar 22, 2016
61be0a2
Merge branch 'for_auto_test' of https://github.com/dase/CLAIMS
fzhedu Mar 23, 2016
94db32f
Merge branch 'for_auto_test' of https://github.com/dase/CLAIMS
fzhedu Mar 23, 2016
c993288
merge with master i.e. the newest for_auto_test of dase
fzhedu Mar 23, 2016
33fc1c4
delete data file results.txt
fzhedu Mar 23, 2016
d55d2e3
delete data file results.txt
fzhedu Mar 23, 2016
87f7a7e
delete results.txt
fzhedu Mar 23, 2016
786f696
update 2.7.1 makefile
fzhedu Mar 23, 2016
4cddba2
update 2.7.1 makefile
fzhedu Mar 23, 2016
052db18
scripts imperfect version
cs-wang Mar 23, 2016
0263b80
merge from dase/CLAIMS for_auto_test, delete result.txt in claims-tes…
cs-wang Mar 24, 2016
1a12060
OPTIMIZE: specify FileOpenFlag in constructor function in file connctor
yukai2014 Mar 24, 2016
b559eec
scripts improvement
cs-wang Mar 24, 2016
6c6917f
scripts improvement
cs-wang Mar 24, 2016
2973cc9
merge with dase0324
Jackson1992 Mar 24, 2016
eedaee3
test
Jackson1992 Mar 25, 2016
5bea6ff
fix a bug
Jackson1992 Mar 25, 2016
7ad23e7
Merge remote-tracking branch 'remotes/origin/autotest-dase160324' into
yukai2014 Mar 25, 2016
920eb3e
ADD: destructor function in HdfsConnector to disconnect hdfs
yukai2014 Mar 28, 2016
d7626ba
OPTIMIZE: client outputs error info in red color
yukai2014 Mar 28, 2016
26dc087
remove CLAIMS_HOME in scripts
cs-wang Mar 28, 2016
ecfc487
config to fit 90s192
cs-wang Mar 28, 2016
923818d
OPTIMIZE: use .so instead of .a in Makefile.am
yukai2014 Mar 29, 2016
758a8f5
scripts improve for 90s192
cs-wang Mar 30, 2016
e981ead
bug fix
cs-wang Mar 30, 2016
e1b6473
bug fix
cs-wang Mar 30, 2016
b666ee1
bug fix
cs-wang Mar 30, 2016
451d6b0
script: monitor_loader.py improvement
cs-wang Mar 30, 2016
fef582f
ADD: close connector after saving catalog
yukai2014 Mar 31, 2016
850e63a
could report execution status
fzhedu Apr 1, 2016
1473899
ok
fzhedu Apr 3, 2016
315ce54
extract status class
fzhedu Apr 3, 2016
2a1c3f3
extract status class
fzhedu Apr 3, 2016
0b69f16
add segment exec status paramater to open() ,next()
fzhedu Apr 3, 2016
ce66f65
caf couldn't transfer enum type
fzhedu Apr 4, 2016
0b7b48a
tuple style improve in python script
cs-wang Apr 5, 2016
8fc0767
canceling segment is OK
fzhedu Apr 7, 2016
b3343d2
add left and right outer join with equal condition.
FishYoung Apr 7, 2016
6e9fec3
solve the bug that chunk_list is zero by mulit insert(ReturnChunk)
Jackson1992 Apr 7, 2016
4de95c9
expr value_ = NULL and it->destory()
fzhedu Apr 9, 2016
6d67315
fix bug in exchange_merger.cpp by initalizing socket_fd
fzhedu Apr 9, 2016
cf273cb
update .gitignore by adding sbin/2-claims-conf*
fzhedu Apr 11, 2016
fac9280
merge .gitignore confict
fzhedu Apr 11, 2016
c2706bf
Merge branch 'master' of https://github.com/yukai2014/Claims into yuk…
fzhedu Apr 11, 2016
32f9f6c
close some gtest related to hdfs
fzhedu Apr 11, 2016
f53297f
t push origin for_auto_testMerge branch 'yukai2014-master' into for_a…
fzhedu Apr 11, 2016
06fd532
Merge branch 'scripts' of https://github.com/cs-wang/CLAIMS into cs-w…
fzhedu Apr 11, 2016
c1d7197
t push origin for_auto_testMerge branch 'cs-wang-scripts' into for_au…
fzhedu Apr 11, 2016
db720ab
update expr
fzhedu Apr 13, 2016
578fb40
update expr in equal_join
fzhedu Apr 14, 2016
ff2bbe8
update expr in equal_join everywhere
fzhedu Apr 14, 2016
a066354
delete useless vector
fzhedu Apr 14, 2016
653c436
fix substring bug
fzhedu Apr 15, 2016
155ba9f
add full outer join, but it just works under single thread
FishYoung Apr 16, 2016
d95d14f
change pushdowncondition() and find bug due to deleting the member po…
fzhedu Apr 19, 2016
6578673
modify full outer join. Now full outer join support multiple threads.
FishYoung Apr 19, 2016
576f971
modify the full join logic under mutiple threads.
FishYoung Apr 20, 2016
798e355
modify full outer join logic again to fix some bugs under a lot of data.
FishYoung Apr 20, 2016
850e71c
decimal optimization
cs-wang Apr 21, 2016
2c4852c
Merge with dase/for_auto_test.Fix some bugs about multiple threads pr…
FishYoung Apr 22, 2016
8d5e092
fix a bug: Hashtable iterator can not be remarked when hashtable_iter…
FishYoung Apr 25, 2016
fba27a9
fix a bug: wrong condition about Next() exit, so the thread wait othe…
FishYoung Apr 25, 2016
3746fd6
number = 1 -> number = 4 in 4partition
cs-wang Apr 28, 2016
f5005b1
fix old bug that occur again
fzhedu Apr 30, 2016
2986791
fix bug in Debug.h which found by yk
fzhedu May 2, 2016
73ba278
Fix a bug: sometimes the tuples in hash table can't be looped through…
FishYoung May 3, 2016
a3c4eeb
exchange tables of EqualJoin in gtest
fzhedu May 3, 2016
34e384f
Merge branch 'for_auto_test'
fzhedu May 3, 2016
cfda34b
Merge pull request #130 from fzhedu/master
fzhedu May 3, 2016
a99799f
merge from for_auto_test
cs-wang May 4, 2016
e0b0959
merge from for_auto_test
cs-wang May 4, 2016
5d1110b
Merge branch 'for_auto_test_remote' into for_auto_test
fzhedu May 5, 2016
4c52677
fix bug due to my fault
fzhedu May 5, 2016
c8d484f
Merge branch 'auto_test' into decimal2
cs-wang May 5, 2016
791ca94
performance result gen
cs-wang May 5, 2016
626f852
merge with for_auto_test_0505
Jackson1992 May 5, 2016
27d651e
check memory leak and solved
Jackson1992 May 5, 2016
68e2714
filelst sort
cs-wang May 6, 2016
b29ceaa
fix memory leak
Jackson1992 May 6, 2016
2b3604c
merge with dase/CLAIMS:for_auto_test.Modify the outer join according …
FishYoung May 6, 2016
30bc615
Merge branch 'for_auto_test' of https://github.com/dase/CLAIMS into o…
FishYoung May 6, 2016
3cbffff
fix a bug about join condition after merging.
FishYoung May 6, 2016
955e478
debug
Jackson1992 May 7, 2016
f756be8
update folder sbin
Jackson1992 May 16, 2016
e200830
t push origin for_auto_testMerge branch 'Jackson1992-storage' into fo…
fzhedu May 16, 2016
864208f
Merge branch 'decimal2' of https://github.com/cs-wang/CLAIMS into cs-…
fzhedu May 16, 2016
c95c921
t push origin for_auto_testMerge branch 'cs-wang-decimal2' into for_a…
fzhedu May 16, 2016
4f69ed2
merge with csw-decimal, change gitignore
fzhedu May 16, 2016
b7b0212
fix bug in delete operator
fzhedu May 16, 2016
95b7423
merge caf to for_auto_test
fzhedu May 18, 2016
2a2b709
delete useless output
fzhedu May 18, 2016
8e92328
correct the condition push down under outer join.
FishYoung May 19, 2016
301d74e
fix erase() bug of unordered_map and add some comments
fzhedu May 20, 2016
99ba77d
fix memory leak
Jackson1992 May 20, 2016
91b4b5b
reduce remote_actor
fzhedu May 21, 2016
efb04ff
update error no
fzhedu May 21, 2016
212c0b7
exchange tables of EqualJoin in gtest
fzhedu May 21, 2016
1cb4488
fix bug of dead lock
fzhedu May 22, 2016
b1699d5
delete useless LOG
fzhedu May 22, 2016
93e7caf
merge with dase/CLAIMS:for_auto_test.Fix a bug in AstFromList, GetEqu…
FishYoung May 23, 2016
c3d906c
merge from for_auto_test
cs-wang May 23, 2016
4e4980e
add run-gtest.sh
cs-wang May 23, 2016
a7c7987
t push origin for_auto_testMerge branch 'cs-wang-decimal2' into for_a…
fzhedu May 24, 2016
851e28a
Merge branch 'outer_join' of https://github.com/FishYoung/CLAIMS into…
fzhedu May 24, 2016
5e5b04b
add () is NULL and is not NULL, used in out join for int, u_long,varc…
fzhedu May 24, 2016
324db4d
t push origin for_auto_test
fzhedu May 24, 2016
96db6d1
update lock
fzhedu May 25, 2016
173352d
lock
Jackson1992 May 25, 2016
e80fdf7
check out join
fzhedu May 25, 2016
0c0979d
add claimsserver tracker in sbin scripts
cs-wang May 25, 2016
e570c34
Merge branch 'for_auto_test_1' into lock_muti_read
Jackson1992 May 26, 2016
01aec4f
memory lock
Jackson1992 May 26, 2016
af6f06a
open several glog in exchange_merger.cpp
fzhedu May 30, 2016
f971c00
scripts improvement
cs-wang Jun 2, 2016
f0ae546
Merge branch 'for_auto_test' into mergerbug
cs-wang Jun 2, 2016
1e71612
memory leak
Jackson1992 Jun 2, 2016
9ac1bc5
run-gtest.sh add run time
cs-wang Jun 2, 2016
0505e8b
merger bug solution1
cs-wang Jun 3, 2016
df55d6f
add slave node try to connect to master
fzhedu Jun 6, 2016
b6ac746
memory leak finish state 1
Jackson1992 Jun 7, 2016
16bb39e
merger verfiy with goto
cs-wang Jun 7, 2016
b9898bd
mergerbug without goto
cs-wang Jun 8, 2016
90c5c3d
add micro CONNECTION_VERIFY
cs-wang Jun 8, 2016
2fa547e
open the micro CONNECTION_VERITY
cs-wang Jun 8, 2016
f0fa971
memory leak
Jackson1992 Jun 10, 2016
cc303f8
Merge branch 'forHan' into forTEST
Jackson1992 Jun 10, 2016
f3f6c89
just for test
Jackson1992 Jun 10, 2016
7de9c52
fix logical_equal_join bug
fzhedu Jun 12, 2016
870f98a
heartbeat
zhejiangxiaomai Jul 8, 2016
3a89038
heartbeat
zhejiangxiaomai Jul 8, 2016
0a4fdd6
rewrite report status
fzhedu Jul 9, 2016
64b3234
for_test
Jul 9, 2016
53f1f7f
heart
zhejiangxiaomai Jul 10, 2016
6c7aad1
update
zhejiangxiaomai Jul 11, 2016
5c3d6aa
modifed the sbin
Jackson1992 Jul 11, 2016
aa3e145
Merge branch 'for_auto_test_2' into forTEST
Jackson1992 Jul 11, 2016
4d21f77
reregister ok
zhejiangxiaomai Jul 14, 2016
45b4d73
change reporting status by event_based
fzhedu Jul 19, 2016
ab4a1d9
Merge branch 'forTEST' into for_auto_test
cs-wang Jul 20, 2016
798d14e
partition
zhejiangxiaomai Jul 22, 2016
47c439d
fix bug about CAF by fzh
cs-wang Jul 23, 2016
19cf3e3
fix reregister
zhejiangxiaomai Jul 24, 2016
adb15dd
fix register
zhejiangxiaomai Jul 24, 2016
c1f75b7
blockmanager problem
zhejiangxiaomai Jul 26, 2016
29ac380
master restart problem
zhejiangxiaomai Jul 26, 2016
7424432
register ok , heartbeat
zhejiangxiaomai Jul 28, 2016
30863c7
just for commit
zhejiangxiaomai Jul 31, 2016
a98088c
guizhoutest
cs-wang Aug 1, 2016
98939bd
merge from CAFfzh for new feature update
cs-wang Aug 1, 2016
15066a6
fault-tolerance step1 finish
zhejiangxiaomai Aug 1, 2016
47ef8b2
add log
Jackson1992 Aug 2, 2016
47dd69e
add test of huishuiQ1
cs-wang Aug 5, 2016
1669e02
add test for huishuiQ1
cs-wang Aug 5, 2016
215ebe5
Merge branch 'update' into guizhoutest
cs-wang Aug 5, 2016
8c52ab7
fix syntax
zhejiangxiaomai Aug 5, 2016
c0e27e7
add test for guizhou proj
cs-wang Aug 7, 2016
cfff52f
test for bug 0802
Jackson1992 Aug 8, 2016
a321c75
add scripts monitor-guizhou-90s.sh
cs-wang Aug 13, 2016
6fd9481
delete .idea
fzhedu Aug 13, 2016
9440dbc
merget
fzhedu Aug 13, 2016
3e918df
t push origin for_auto_testMerge branch 'cs-wang-guizhoutest' into fo…
fzhedu Aug 13, 2016
c3152ad
avoid reporting status when updating status
fzhedu Aug 13, 2016
e2dc66a
uniform the execute() of select stmt for avoiding error on delete stmt
fzhedu Aug 15, 2016
69d03e9
UPDATE support
cs-wang Aug 17, 2016
a9a6ae8
Merge branch 'updatenew' into update
cs-wang Aug 18, 2016
9f02181
update support step2
cs-wang Aug 18, 2016
a5de8c7
update support 3
cs-wang Aug 19, 2016
248179f
fix some output
zhejiangxiaomai Aug 22, 2016
d4b33b3
update support version 1.0
cs-wang Aug 22, 2016
90f78f6
update support version 1.0.1
cs-wang Aug 22, 2016
c3e4385
fix bug in heartbeat stage
zhejiangxiaomai Aug 22, 2016
b959c4d
add error process in stmt_tracker
zhejiangxiaomai Aug 25, 2016
fb99466
add segment KError
zhejiangxiaomai Aug 25, 2016
cdd44ce
segment kCancelled
zhejiangxiaomai Aug 26, 2016
5f01bf9
fix stmt_exec_status.cpp error_case
zhejiangxiaomai Aug 26, 2016
c27a551
avoid contention in scan (update catalog)
Jackson1992 Aug 29, 2016
5013a58
clear unused log
Jackson1992 Aug 29, 2016
1a210f1
Merge branch 'CAFfzh' into for_auto_test
Jackson1992 Aug 29, 2016
f8b8090
Add getest of outer join (#142)
FishYoung Sep 1, 2016
ef09710
Merge pull request #144 from zhejiangxiaomai/for_auto_test
fzhedu Sep 1, 2016
cec7567
merge
fzhedu Sep 1, 2016
e126f8e
t push origin for_auto_testMerge branch 'Jackson1992-for_auto_test' i…
fzhedu Sep 1, 2016
16a2b3b
fix bug in stmt_exec_tracker.cpp:147, when it==end(), then it->first …
fzhedu Sep 1, 2016
f78e57f
update reporttime to 3s
fzhedu Sep 1, 2016
257a89b
merge with for_auto_test
zhejiangxiaomai Sep 2, 2016
711b91e
solve delete update memory leak & oom_adj script & update delete test…
cs-wang Sep 4, 2016
8771e9a
delete exec_result->result_; after GenerateUpdateData
cs-wang Sep 4, 2016
022eba2
Merge pull request #146 from cs-wang/update
fzhedu Oct 3, 2016
81a803f
Merge pull request #147 from zhejiangxiaomai/new_heartbeat
fzhedu Oct 3, 2016
7a1f8dd
Fix a bug caused by ambiguous open_flag in load statement.
FishYoung Nov 29, 2016
b44f384
change assert to LoadFromFile() method
FishYoung Nov 29, 2016
39ff784
add more assert in IF branches.
FishYoung Nov 29, 2016
e26ba05
Merge pull request #152 from FishYoung/load_stmt
yukai2014 Nov 29, 2016
7ca6b0d
change the threshold of memory buffer(dynamic)
Jackson1992 Dec 12, 2016
4fcea4e
Merge pull request #153 from Jackson1992/for_auto_test
Jackson1992 Dec 12, 2016
44de51d
the conflicts of loading and querying has fixed
Jackson1992 Dec 19, 2016
6c713cb
Merge pull request #154 from Jackson1992/for_auto_test
Jackson1992 Dec 19, 2016
1c99497
solve bug in sort
fzhedu Feb 28, 2017
e0eafdd
Merge branch 'for_auto_test_remote' into for_auto_test
fzhedu Feb 28, 2017
95bcca9
Add the function of loading from hdfs to hdfs.
hchsh Mar 24, 2017
7554cf4
Add the function of loading from hdfs to hdfs.
hchsh Mar 24, 2017
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
  •  
  •  
  •  
53 changes: 21 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
!thirdparty/
.idea
.vscode/*
*.Po
*.a
*.doxyfile
*.dat*
*.doxyfile
*.o
*sql.output
.cproject
.gitignore.swp
.history
.project
.settings
/test
Build
CLAIMS.config
CLAIMS.creator*
CLAIMS.files
CLAIMS.includes
Config.cpp
Debug.h
Default
Expand All @@ -23,6 +29,7 @@ autom4te.cache/
bin/
build
claims.log
claims_log/
claimsserver
client
compile
Expand All @@ -38,47 +45,29 @@ config.status
config.sub
configure
depcomp
doc
include/
install-sh
install/
libtool
log
ltmain.sh
missing
stamp-h1
Makefile.in
*.Po
Debug.h
install/
*.a
*.o
Makefile
config.h
config.h.in
config.log
configure
claims.log
doc
conf
conf/config
build
Build
*.dat*
include/
.history
compile
thirdparty/
ar-lib
缺省值
CLAIMS.config
CLAIMS.creator*
CLAIMS.files
CLAIMS.includes
*sql.output
*.doxyfile
sbin/.claimssserver.pid
<<<<<<< HEAD
sbin/2-claims-conf/claims_log/
sbin/2-claims-conf/config-*
sbin/2-claims-conf/test_for_DI_GetTuple
=======
sbin/2-claims-conf/
>>>>>>> f5005b1ecfdcfb429ed630a0dfd573e1129a592b
sbin/claims-test/claims_log/
sbin/claims-test/test_for_DI_GetTuple
sbin/claims-test/testresult/
sbin/claims-test/testresult/*.result
sbin/claims_log/
sbin/logs/
stamp-h1
test_for_DI_GetTuple
thirdparty/
缺省值
2,483 changes: 2,483 additions & 0 deletions CMakeLists.txt

Large diffs are not rendered by default.

44 changes: 42 additions & 2 deletions Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ void submit_command(Client& client, std::string& command) {
printf("%s", message.c_str());
break;
case Client::error:
printf("%s", message.c_str());
printf(
"\e[0;31m"
"%s\033[0m\n",
message.c_str());
break;
default:
assert(false);
Expand All @@ -73,15 +76,45 @@ void submit_command_repeated(Client& client, std::string& command,
printf("%s", message.c_str());
break;
case Client::error:
printf("%s", message.c_str());
printf(
"\e[0;31m"
"%s\033[0m\n",
message.c_str());
break;
default:
assert(false);
break;
}
}
}
void PrintUsage() {
cout << "Welcome to use CLAIMS. " << endl;
cout << "Type: " << endl;
cout << "\t help; for usage of CLAIMS." << endl;
cout << "\t copyright; for distribution terms." << endl;
cout << "\t exit; or shutdown; for exiting CLAIMS." << endl;
}

void PrintCopyright() {
cout << "Copyright [2012-2015] DaSE@ECNU " << endl
<< " Licensed to the Apache Software Foundation (ASF) under one or more"
<< " contributor license agreements. See the NOTICE file distributed "
"with"
<< " this work for additional information regarding copyright ownership."
<< " The ASF licenses this file to You under the Apache License, "
"Version 2.0"
<< " (the \" License\"); you may not use this file except in compliance "
"with"
<< " the License. You may obtain a copy of the License at" << endl
<< " http://www.apache.org/licenses/LICENSE-2.0" << endl
<< " Unless required by applicable law or agreed to in writing, software"
<< " distributed under the License is distributed on an \" AS IS \" "
"BASIS,"
<< " WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or "
"implied."
<< " See the License for the specific language governing permissions and"
<< " limitations under the License." << endl;
}
int main(int argc, char** argv) {
/* Client */

Expand All @@ -98,6 +131,7 @@ int main(int argc, char** argv) {

claims::common::Logging claims_logging(argv[0]);
print_welcome();
PrintUsage();

Client client;
client.connection(argv[1], atoi(argv[2]));
Expand All @@ -115,6 +149,12 @@ int main(int argc, char** argv) {
break;
} else if (command.empty()) {
continue;
} else if (command == "help;") {
PrintUsage();
continue;
} else if (command == "copyright;") {
PrintCopyright();
continue;
}

submit_command(client, command);
Expand Down
57 changes: 38 additions & 19 deletions Client/ClaimsServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ int ClientListener::receiveRequest(const int fd, const char *cmd) {
remote_command rcmd;
rcmd.socket_fd = fd;
// rcmd.cmd.append(cmd);
cout << cmd << endl;
rcmd.cmd = std::string(cmd);

Daemon::getInstance()->addRemoteCommand(rcmd);
Expand Down Expand Up @@ -266,11 +267,10 @@ void *ClientListener::receiveHandler(void *para) {
server->removeClient(server->m_clientFds[i]);
continue;
}

// cout<<"nread:"<<nread<<endl;
memset(buf, 0, sizeof(buf));
int read_count = read(server->m_clientFds[i], buf, nread);
buf[read_count] = '\0'; // fix a bug
buf[read_count] = '\0'; // fix a bug

int sql_type = buf[0] - 48; // '1' - 48 = 1
ClientLogging::log("sql_type is %d", sql_type);
if (sql_type <= 9 && sql_type >= 0) {
Expand Down Expand Up @@ -763,16 +763,20 @@ void *ClientListener::sendHandler(void *para) {
} else if (client_type::c == server->client_type_) {
// query return true
cliRes.setOk("Yes Ok");
ClientListenerLogging::log(
"to send data response-- status:%d length:%d content:%s fd:%d",
cliRes.status, cliRes.length, cliRes.content.c_str(), result.fd_);
// ClientListenerLogging::log(
// "to send data response-- status:%d length:%d
// content:%s fd:%d",
// cliRes.status, cliRes.length, cliRes.content.c_str(),
// result.fd_);
server->write(result.fd_, cliRes);
printf("send ok response packet ok\n");

cliRes.setSchema(result.result_->schema_);
ClientListenerLogging::log(
"to send data response-- status:%d length:%d content:%s fd:%d",
cliRes.status, cliRes.length, cliRes.content.c_str(), result.fd_);
// ClientListenerLogging::log(
// "to send data response-- status:%d length:%d
// content:%s fd:%d",
// cliRes.status, cliRes.length, cliRes.content.c_str(),
// result.fd_);
server->write(result.fd_, cliRes);
printf("send schema response packet ok\n");

Expand All @@ -782,9 +786,11 @@ void *ClientListener::sendHandler(void *para) {
header.add_header(list[i]);
}
cliRes.setAttributeName(header);
ClientListenerLogging::log(
"to send data response-- status:%d length:%d content:%s fd:%d",
cliRes.status, cliRes.length, cliRes.content.c_str(), result.fd_);
// ClientListenerLogging::log(
// "to send data response-- status:%d length:%d
// content:%s fd:%d",
// cliRes.status, cliRes.length, cliRes.content.c_str(),
// result.fd_);
server->write(result.fd_, cliRes);
printf("send head response packet ok\n");

Expand All @@ -797,11 +803,13 @@ void *ClientListener::sendHandler(void *para) {
while (block = (BlockStreamBase *)it.atomicNextBlock()) {
block->serialize(serialzed_block);
cliRes.setDataBlock(serialzed_block);
ClientListenerLogging::log(
"to send data response-- status:%d length:%d content:%s "
"fd:%d",
cliRes.status, cliRes.length, cliRes.content.c_str(),
result.fd_);
// ClientListenerLogging::log(
// "to send data response-- status:%d length:%d
// content:%s "
// "fd:%d",
// cliRes.status, cliRes.length,
// cliRes.content.c_str(),
// result.fd_);
server->write(result.fd_, cliRes);
}
printf("send data packet ok\n");
Expand All @@ -812,6 +820,11 @@ void *ClientListener::sendHandler(void *para) {
cliRes.status, cliRes.length, cliRes.content.c_str());
server->write(result.fd_, cliRes);
printf("send end response packet ok\n");
if (NULL != result.result_) {
delete result.result_;
result.result_ = NULL;
// cout << "delete result in memory" << endl;
}
}
}
} else {
Expand All @@ -828,6 +841,11 @@ void *ClientListener::sendHandler(void *para) {
result.warning_.c_str());
server->write(result.fd_, cliRes);
printf("send error packet ok\n");
if (NULL != result.result_) {
delete result.result_;
result.result_ = NULL;
cout << "delete result in memory" << endl;
}
}
}
return NULL;
Expand Down Expand Up @@ -1035,8 +1053,9 @@ int ClientListener::write(const int fd, const ClientResponse &res) const {

// ret = ::write(fd, buffer, length);
ret = send(fd, buffer, length, MSG_WAITALL);
LOG(INFO) << "Server: " << res.status << " bytes:" << ret << "\t"
<< res.length << "\t" << res.content.c_str() << " is send!" << endl;
// LOG(INFO) << "Server: " << res.status << " bytes:" << ret << "\t"
// << res.length << "\t" << res.content.c_str() << " is send!" <<
// endl;
// ret = ::write(fd,buffer,length);
// if (ret < 0) {
// ClientLogging::elog("when send to fd %d, send buffer failed.%s",
Expand Down
14 changes: 8 additions & 6 deletions Client/ClientResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,14 @@ struct ClientResponse {
void* content_start = buffer + sizeof(int) + sizeof(int);
memcpy(content_start, content.data(), content.length());

ClientLogging::log("buffer to send is : %d-%d-%d-%d-%d-%d-%d-%d| %d=%d",
(unsigned int)buffer[0], (unsigned int)buffer[1],
(unsigned int)buffer[2], (unsigned int)buffer[3],
(unsigned int)buffer[4], (unsigned int)buffer[5],
(unsigned int)buffer[6], (unsigned int)buffer[7], status,
length);
// ClientLogging::log("buffer to send is : %d-%d-%d-%d-%d-%d-%d-%d|
// %d=%d",
// (unsigned int)buffer[0], (unsigned int)buffer[1],
// (unsigned int)buffer[2], (unsigned int)buffer[3],
// (unsigned int)buffer[4], (unsigned int)buffer[5],
// (unsigned int)buffer[6], (unsigned int)buffer[7],
// status,
// length);
return ret;
}

Expand Down
11 changes: 4 additions & 7 deletions Client/Test/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@

AM_CPPFLAGS= -fPIC -fpermissive \
-I${BOOST_HOME} \
-I${BOOST_HOME}/boost/serialization \
-I${HADOOP_HOME}/src/c++/libhdfs\
-I${HADOOP_HOME}/include\
-I${JAVA_HOME}/include\
-I${JAVA_HOME}/include/linux\
-I${THERON_HOME}/Include
-I${JAVA_HOME}/include/linux

#<boost/unordered_map.hpp>应该加什么编译选项
AM_LDFLAGS=-lc -lm -lrt lboost_serialization -lxs
Expand All @@ -17,10 +15,9 @@ endif

LDADD = ../../catalog/libcatalog.a \
../../common/libcommon.a \
${HADOOP_HOME}/c++/Linux-amd64-64/lib/libhdfs.a \
${HADOOP_HOME}/lib/native/libhdfs.a\
${JAVA_HOME}/jre/lib/amd64/server/libjvm.so\
${HADOOP_HOME}/c++/Linux-amd64-64/lib/libhdfs.so \
${THERON_HOME}/Lib/libtherond.a \
${HADOOP_HOME}/lib/native/libhdfs.so\
${BOOST_HOME}/stage/lib/libboost_serialization.so \
${BOOST_HOME}/stage/lib/libboost_serialization.a

Expand Down
5 changes: 4 additions & 1 deletion Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ using namespace std;
string gete() {
char *p = getenv("CLAIMS_HOME");
stringstream sp;
sp << string(p).c_str() << "/conf/config";
sp << string(p).c_str() << "conf/config";
return sp.str();
// return "/home/imdb/config/wangli/config";
}
Expand Down Expand Up @@ -89,6 +89,7 @@ std::string Config::catalog_file;
int Config::thread_pool_init_thread_num;

int Config::load_thread_num;
int Config::memory_utilization;

Config *Config::getInstance() {
if (instance_ == 0) {
Expand Down Expand Up @@ -151,6 +152,8 @@ void Config::initialize() {

load_thread_num = getInt("load_thread_num", sysconf(_SC_NPROCESSORS_CONF));

memory_utilization = getInt("memory_utilization", 100);

#ifdef DEBUG_Config
print_configure();
#endif
Expand Down
1 change: 1 addition & 0 deletions Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class Config {
static bool enable_codegen;
static std::string catalog_file;
static int thread_pool_init_thread_num;
static int memory_utilization;

static int load_thread_num;

Expand Down
2 changes: 2 additions & 0 deletions Daemon/Daemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
using claims::utility::LockGuard;

struct remote_command {
remote_command() {}
remote_command(std::string s, int fd) : cmd(s), socket_fd(fd) {}
std::string cmd;
int socket_fd;
};
Expand Down
Loading