Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
520 commits
Select commit Hold shift + click to select a range
a154ea3
store changge
codeBabyLin Dec 6, 2019
f9e2e5a
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Dec 6, 2019
8ea1342
Modify PNodeServer, start neo4j at local thread.
Airzihao Dec 6, 2019
be3d6fc
Merge remote-tracking branch 'origin/master'
Airzihao Dec 6, 2019
c6d3611
Add DistributedDataRecoverTest.
Airzihao Dec 6, 2019
f43d014
tets for solr pass
codeBabyLin Dec 6, 2019
9e63845
test for solr pass
codeBabyLin Dec 6, 2019
fcd59a6
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Dec 6, 2019
405eb11
add more asserts to test of solr
codeBabyLin Dec 6, 2019
6a03a75
test for solr predicates
codeBabyLin Dec 6, 2019
1dd899a
update tests
lzxddz Dec 6, 2019
5b217fb
Merge remote-tracking branch 'origin/master'
lzxddz Dec 6, 2019
60e0eef
Parallel writing to cluster.
Airzihao Dec 7, 2019
eda7ecc
Merge remote-tracking branch 'origin/master'
Airzihao Dec 7, 2019
42a3c62
Modify the CypherPlusUtils, fix the write-statement judge bug.
Airzihao Dec 7, 2019
cdd2a82
Add a detailed test of panda driver.
Airzihao Dec 7, 2019
bc76f3d
Threads to run pnode server
codeBabyLin Dec 8, 2019
7943d59
navie rpc test
codeBabyLin Dec 8, 2019
2f95359
Modify the path initializer.
Airzihao Dec 9, 2019
7bb853d
Merge remote-tracking branch 'origin/master'
Airzihao Dec 9, 2019
9e46cbb
Disable double blank lines.
Airzihao Dec 9, 2019
342ce04
Modify some old problems.
Airzihao Dec 9, 2019
93b72bb
add valid isDefine in "nodeGetProperty()"
lzxddz Dec 9, 2019
2680344
Merge remote-tracking branch 'origin/master'
lzxddz Dec 9, 2019
4d658db
update tests
lzxddz Dec 9, 2019
6b8fa58
delete useless code
lzxddz Dec 9, 2019
7414dd9
add api query test
lzxddz Dec 9, 2019
04ee6d6
add ppd to AllNodesScanPipe
excelwang Dec 9, 2019
9dbc8c7
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
excelwang Dec 9, 2019
751000a
Figure problems about driver, session, and transaction. Modify parall…
Airzihao Dec 9, 2019
b262a22
Merge remote-tracking branch 'origin/master'
Airzihao Dec 9, 2019
525eb9c
trim import
excelwang Dec 10, 2019
d3e46cb
Modify pom.xml to build jar-with-dependencies.
Airzihao Dec 10, 2019
507ae27
Merge remote-tracking branch 'origin/master'
Airzihao Dec 10, 2019
ca87e50
update modules dependency
lzxddz Dec 10, 2019
24da89e
Modify some old problems.
Airzihao Dec 10, 2019
07a16eb
Merge remote-tracking branch 'origin/master'
Airzihao Dec 10, 2019
dfe52fc
add PPDPipe as base pipe for leaf pipe with ppd on
excelwang Dec 10, 2019
9b263c3
Implement a naive performance test.
Airzihao Dec 11, 2019
3bd47ef
Merge remote-tracking branch 'origin/master'
Airzihao Dec 11, 2019
af334cd
Modify some problems.
Airzihao Dec 11, 2019
b73dbb2
add a new function to InSolr
codeBabyLin Dec 11, 2019
7474c77
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Dec 11, 2019
f8b675f
modify for package
codeBabyLin Dec 11, 2019
b78203a
modify for package
codeBabyLin Dec 11, 2019
4cd68b9
modify for package
codeBabyLin Dec 11, 2019
847868f
modify for package
codeBabyLin Dec 11, 2019
78eb7fc
modify for package
codeBabyLin Dec 11, 2019
8548fe3
real place for package program
codeBabyLin Dec 11, 2019
47089b1
modify for package
codeBabyLin Dec 11, 2019
15a83c7
opt ppd class structure
excelwang Dec 12, 2019
49dfd78
rename test file
codeBabyLin Dec 12, 2019
7040585
add function to InMem
codeBabyLin Dec 12, 2019
adaf68a
add string filter push down
excelwang Dec 12, 2019
3f6cd8d
add filter push down to NodeByLabelScanPipe
excelwang Dec 12, 2019
e722092
midify for in solr
codeBabyLin Dec 12, 2019
7a7b7cb
Prepare performance test.
Airzihao Dec 12, 2019
463d678
Merge remote-tracking branch 'origin/master'
Airzihao Dec 12, 2019
c69c6b1
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Dec 13, 2019
02dc04e
opt PPDPile
excelwang Dec 13, 2019
341a90d
opt PPDPipe
excelwang Dec 13, 2019
f428b67
fix "no physical operator expand" error
excelwang Dec 13, 2019
8429a6c
add testJoin
excelwang Dec 13, 2019
de7325f
add more ppd query cases
excelwang Dec 13, 2019
d7c89cf
finish function to InMem
codeBabyLin Dec 13, 2019
8754c90
opt ppd
excelwang Dec 13, 2019
ad88a4b
add and reorg ppd test cases
excelwang Dec 13, 2019
06f1c71
minor improve
excelwang Dec 13, 2019
e56f7ed
ProformanceTest v1 finished.
Airzihao Dec 13, 2019
148f30e
Merge remote-tracking branch 'origin/master'
Airzihao Dec 13, 2019
a0eda8b
midify for in InMem
codeBabyLin Dec 13, 2019
de30586
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Dec 13, 2019
81468c7
Prepare performance test.
Airzihao Dec 16, 2019
59c162c
Merge remote-tracking branch 'origin/master'
Airzihao Dec 16, 2019
d152b28
Fix a bug of cluster-lock.
Airzihao Dec 20, 2019
c46c1a3
Add an environment test for release.
Airzihao Dec 20, 2019
d9e1358
Use regex to extract ip:port from panda string.
Airzihao Dec 20, 2019
de75c5d
Fix scalastyle problems.
Airzihao Dec 20, 2019
47bf561
Fix scalastyle problems.
Airzihao Dec 20, 2019
b3e9906
use ContextMap
bluejoe2008 Dec 20, 2019
49ef00c
Merge remote-tracking branch 'origin/master'
bluejoe2008 Dec 20, 2019
5a96800
Solve the review problem.
Airzihao Dec 20, 2019
b3ca4e9
Solve the review problem.
Airzihao Dec 21, 2019
7d48f43
use singleton InstanceContext
bluejoe2008 Dec 21, 2019
0ecd67e
use singleton InstanceContext
bluejoe2008 Dec 21, 2019
0ed878e
Revisit to the tests.
Airzihao Dec 22, 2019
5dca30e
rename ppd
excelwang Dec 23, 2019
2ed633a
update class Operations: add isLeaderNode charge
lzxddz Dec 23, 2019
970bf94
Add external props storage bind.
Airzihao Dec 23, 2019
ff92d1d
Merge remote-tracking branch 'origin/master'
Airzihao Dec 23, 2019
35ca3e4
add test case for indexScan
excelwang Dec 23, 2019
dd0f709
modifi test
codeBabyLin Dec 24, 2019
114e583
enable to WX Array
codeBabyLin Dec 24, 2019
a88a5bc
test of Array
codeBabyLin Dec 24, 2019
597e0e4
Revisit the tests, distributed launcher solution not comfirmed.
Airzihao Dec 24, 2019
00303b3
Merge remote-tracking branch 'origin/master'
Airzihao Dec 24, 2019
8811a7c
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Dec 24, 2019
2e1e3e8
remove space lines
codeBabyLin Dec 24, 2019
e2aa4d3
remove space lines
codeBabyLin Dec 24, 2019
3843d95
remove space lines
codeBabyLin Dec 24, 2019
b1df07c
remove space lines
codeBabyLin Dec 24, 2019
1f85b2b
remove space lines
codeBabyLin Dec 24, 2019
ffa798a
remove space lines
codeBabyLin Dec 24, 2019
2230e0f
remove space lines
codeBabyLin Dec 24, 2019
bc4aeee
remove space lines
codeBabyLin Dec 24, 2019
1d50dab
remove space lines
codeBabyLin Dec 24, 2019
17c61f4
enable to store Array
codeBabyLin Dec 24, 2019
6d17d18
PandaModule
bluejoe2008 Dec 24, 2019
61d118f
Merge remote-tracking branch 'origin/master'
bluejoe2008 Dec 24, 2019
b27c28a
remove space lines
codeBabyLin Dec 24, 2019
9af871c
test for Array store
codeBabyLin Dec 24, 2019
f17ec15
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Dec 24, 2019
252beae
Revisit the func tests
Airzihao Dec 25, 2019
a3cc150
Merge remote-tracking branch 'origin/master'
Airzihao Dec 25, 2019
2d1e69e
PandaModule
bluejoe2008 Dec 25, 2019
1a743ce
Merge remote-tracking branch 'origin/master'
bluejoe2008 Dec 25, 2019
810c109
PandaModule
bluejoe2008 Dec 25, 2019
4de836c
PandaModule
bluejoe2008 Dec 25, 2019
252137f
PandaModule
bluejoe2008 Dec 25, 2019
52423fa
Runnable version, needs futher tuned.
Airzihao Dec 25, 2019
ada995b
PandaModule
bluejoe2008 Dec 25, 2019
ae1fd9b
Merge remote-tracking branch 'origin/master'
bluejoe2008 Dec 25, 2019
7251066
PandaModule
bluejoe2008 Dec 25, 2019
457ccf2
PandaModule
bluejoe2008 Dec 25, 2019
8fce06e
bypass index for external-property store
excelwang Dec 25, 2019
715091d
Runnable version, needs futher tuned.
Airzihao Dec 25, 2019
a451740
Merge remote-tracking branch 'origin/master'
Airzihao Dec 25, 2019
8f96c51
PandaDBTestBase, support starting PNondeServer.
Airzihao Dec 25, 2019
58cf570
Unsafe StandaloneStart Implemented. (With an example.)
Airzihao Dec 26, 2019
6ef0395
Modify pom.xml files.
Airzihao Dec 26, 2019
5409977
test for InMem
codeBabyLin Dec 26, 2019
a9b73ff
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Dec 26, 2019
f7d19cd
support p and p ppd
excelwang Dec 26, 2019
4148d85
fix ppd test cases
excelwang Dec 26, 2019
7665f72
enable to Predicate nesting
codeBabyLin Dec 26, 2019
9f35a4a
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Dec 26, 2019
a8feb3a
Array test pass
codeBabyLin Dec 26, 2019
c7abd97
add tests
codeBabyLin Dec 26, 2019
654551b
enable scala compile first
codeBabyLin Dec 26, 2019
fb210c3
Prepare for the performance test.
Airzihao Dec 26, 2019
7265452
add Ands ppd
excelwang Dec 27, 2019
6c866b4
separate context
bluejoe2008 Dec 27, 2019
6e32ba9
Merge remote-tracking branch 'origin/master'
bluejoe2008 Dec 27, 2019
9fbee7b
separate context
bluejoe2008 Dec 27, 2019
7a13e50
add or ppd and related test
excelwang Dec 27, 2019
e7105e0
remove dummy print
excelwang Dec 27, 2019
6be7bd1
separate context
bluejoe2008 Dec 27, 2019
4626c58
Merge remote-tracking branch 'origin/master'
bluejoe2008 Dec 27, 2019
4b07171
debugs
codeBabyLin Dec 27, 2019
e14b069
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Dec 27, 2019
8830d74
Remove zk operation in PNodeServer, the system is runnable now
Airzihao Dec 27, 2019
ff81709
separate context
bluejoe2008 Dec 28, 2019
97538a6
Merge remote-tracking branch 'origin/master'
bluejoe2008 Dec 28, 2019
8f57be0
separate context
bluejoe2008 Dec 28, 2019
70f8968
delete println
codeBabyLin Dec 29, 2019
615d4e3
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Dec 29, 2019
a972732
change option(isLeaderNode) get way
lzxddz Dec 30, 2019
321dec3
1230 cypher for performance.
Airzihao Dec 30, 2019
aff60af
Merge remote-tracking branch 'origin/master'
Airzihao Dec 30, 2019
2a9642a
Modify rpcPort.
Airzihao Dec 30, 2019
31bfb50
add triple and, or
excelwang Dec 30, 2019
0724537
debugs
codeBabyLin Dec 30, 2019
cf844c6
return all query results
codeBabyLin Dec 30, 2019
e239652
no close for _solrclient
codeBabyLin Dec 31, 2019
f03e235
modify test resources.
Airzihao Dec 31, 2019
59480af
add relation 2-end endswith
excelwang Dec 31, 2019
038286c
Merge remote-tracking branch 'origin/master'
excelwang Dec 31, 2019
0ed0bab
no more querys,set rows = 50000000
codeBabyLin Dec 31, 2019
b3a22db
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Dec 31, 2019
0517c52
Multi driver to run cyphers in performance test.
Airzihao Dec 31, 2019
65159c5
Merge remote-tracking branch 'origin/master'
Airzihao Dec 31, 2019
2e68c35
A part of the cypher statements on the large dataset, hope to perform…
Airzihao Jan 1, 2020
037a5dd
Merge remote-tracking branch 'origin/master'
Airzihao Jan 1, 2020
f849d76
round to pick up node
codeBabyLin Jan 2, 2020
6f70051
dynamic way to set policy to pick up node
codeBabyLin Jan 2, 2020
8c45315
easy round
codeBabyLin Jan 2, 2020
d5c664f
Java driver
codeBabyLin Jan 2, 2020
a61f301
java driver jar
codeBabyLin Jan 2, 2020
70f44a2
Multi driver to run cyphers in performance test.
Airzihao Jan 2, 2020
93cad11
Merge remote-tracking branch 'origin/master'
Airzihao Jan 2, 2020
2e293f7
Modify conf name.
Airzihao Jan 2, 2020
57e9494
Remove unnecessary txt files.
Airzihao Jan 3, 2020
0250b00
watchdog
bluejoe2008 Jan 3, 2020
4890af8
result_consumed_after
bluejoe2008 Jan 3, 2020
44aa2ca
enable to Iterable solr results
codeBabyLin Jan 6, 2020
195ef1c
debugs
codeBabyLin Jan 6, 2020
3fc5f96
test for Iterable solr results passed
codeBabyLin Jan 6, 2020
f71cca8
solr Iterable default size = 20
codeBabyLin Jan 6, 2020
24aa4a6
Temp restore.
Airzihao Jan 6, 2020
85103e2
RpcTest
bluejoe2008 Jan 7, 2020
ef28db2
reviews
bluejoe2008 Jan 7, 2020
7ff6d9c
reviews
bluejoe2008 Jan 7, 2020
d4cf4bb
solve review problems
codeBabyLin Jan 7, 2020
7b980ae
solve reviews problems
codeBabyLin Jan 7, 2020
aed6c36
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Jan 7, 2020
90d1c4d
Fix some review problems.
Airzihao Jan 7, 2020
b31e442
solve reviews problems
codeBabyLin Jan 7, 2020
715f678
solve reviews problems
codeBabyLin Jan 7, 2020
37e17b1
test pass
codeBabyLin Jan 7, 2020
fb8df50
test pass
codeBabyLin Jan 7, 2020
dc075da
trim null useness
excelwang Jan 7, 2020
6ea3adb
Modify old problems.
Airzihao Jan 7, 2020
3a818ef
Merge remote-tracking branch 'origin/master'
Airzihao Jan 7, 2020
8f0d967
Reconstruct the ClusterLog, Iterable used, in FP style, large scale d…
Airzihao Jan 7, 2020
d6ac7cc
Add JsonDataLogRW object, to enable JsonDataLogRW.open(file).
Airzihao Jan 8, 2020
7d80c2a
trim iterator usage
excelwang Jan 8, 2020
35e07af
update revu
excelwang Jan 8, 2020
9c8a456
iterator to iterable
codeBabyLin Jan 8, 2020
d1f146e
iterator2() test pass
codeBabyLin Jan 8, 2020
f154295
Merge remote-tracking branch 'origin/master'
codeBabyLin Jan 8, 2020
633c558
push not down
excelwang Jan 8, 2020
994c934
opt variable naming
excelwang Jan 8, 2020
1326c04
bug fix of Not push down
excelwang Jan 8, 2020
0571342
set iterator size = 10000
codeBabyLin Jan 8, 2020
374747b
add performance test
codeBabyLin Jan 8, 2020
d46ed1e
add conf file for only codeBaby's use
codeBabyLin Jan 8, 2020
5cbe0ae
Merge branch 'master' of https://github.com/bluejoe2008/pandadb-2019
codeBabyLin Jan 8, 2020
f0f545b
add test
codeBabyLin Jan 9, 2020
049a17e
add test case for relation other node ppd
excelwang Jan 10, 2020
466a716
add test case for expanded property filtering
excelwang Jan 13, 2020
48dbd76
add ElasticSearchPropertyNodeStore
lzxddz Jan 13, 2020
cb57742
Merge remote-tracking branch 'origin/master'
lzxddz Jan 13, 2020
c346c07
InElasticSearchPropertyNodeStore: add auto create index;
lzxddz Jan 19, 2020
2ada51b
add test: InEsPredicatePushDown
lzxddz Jan 19, 2020
219dd50
update InElasticSearchPropertyNodeStore: use scroll search
lzxddz Jan 20, 2020
3479b0d
update test
lzxddz Jan 21, 2020
fd2e962
itest: add performance tests
lzxddz Jan 21, 2020
dbcf6b4
update InElasticSearchPropertyNodeStore: search scroll size can be set
lzxddz Feb 12, 2020
3028ee8
push down HasProperty
excelwang Feb 13, 2020
97e2589
add NFConstantCachedIn predicate
excelwang Feb 14, 2020
54c65a4
only enable ppd when NFAnd, NFor
excelwang Feb 20, 2020
dcd2bb1
remove these custom change to neo4j: TxState (change: prevent neo4j …
lzxddz Feb 24, 2020
e1f22a3
remove custom change of neo4j: Operations(prevent add or update prope…
lzxddz Feb 24, 2020
95ad0bc
add compositeIndex testcase
excelwang Feb 24, 2020
5d6b9cf
change CustomPropertyNodeReader: filterNodes() and getNodeBylabelAndF…
lzxddz Feb 25, 2020
6a289ea
change CustomPropertyNodeReader: remove filterNodesWithProperties() a…
lzxddz Feb 25, 2020
4e869c7
update CustomPropertyNodeReader
lzxddz Feb 26, 2020
e1051a9
return VirtualNode Iterator when asking for fetching node for Predic…
excelwang Feb 26, 2020
a96b008
enable pushing down predicate Contains
excelwang Feb 27, 2020
88607dd
add factory class
lzxddz Mar 5, 2020
c1fc624
add packaging module to generate pandadb package
lzxddz Mar 26, 2020
cd9c0df
add pandadb.sh file
lzxddz Mar 26, 2020
67bfc72
Update README.md
bluejoe2008 Apr 19, 2020
c62ff6c
Update README.md
bluejoe2008 May 1, 2020
adbc65d
change es test config
excelwang Jul 24, 2020
4cf5b73
fix bugs when matching/create relationship
excelwang Jul 30, 2020
bd7b0f1
Temp restore.
Airzihao Sep 13, 2020
de78341
Temp restore.
Airzihao Sep 13, 2020
1d0a0ce
New cypher test statements.
Airzihao Sep 15, 2020
4d894c7
Bump junit from 4.12 to 4.13.1
dependabot[bot] Oct 13, 2020
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
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# PandaDB

Intelligent Graph Database.

<img src="https://github.com/bluejoe2008/PandaDB-2019/blob/master/docs/logo.png?raw=true" width=200>

## Licensing

PandaDB-2019 is an open source product licensed under GPLv3.
42 changes: 42 additions & 0 deletions aipm-library/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>parent</artifactId>
<groupId>cn.pandadb</groupId>
<version>0.0.2</version>
<relativePath>../</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>cn.pandadb</groupId>
<artifactId>aipm-library</artifactId>
<dependencies>
<dependency>
<groupId>cn.pandadb</groupId>
<artifactId>commons</artifactId>
<version>${pandadb.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cn.pandadb</groupId>
<artifactId>blob-commons</artifactId>
<version>${pandadb.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-parser-combinators_2.11</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
</dependency>
<dependency>
<groupId>info.debatty</groupId>
<artifactId>java-string-similarity</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cn.aipm

import cn.graiph.PropertyExtractor
import cn.graiph.blob.Blob
import cn.graiph.util.Configuration
import cn.pandadb.cypherplus.PropertyExtractor
import cn.pandadb.blob.Blob
import cn.pandadb.util.{ContextMap, Configuration}

/**
* Created by bluejoe on 2019/2/17.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package cn.aipm.audio

import cn.graiph.PropertyExtractor
import cn.pandadb.cypherplus.PropertyExtractor
import cn.aipm.service.ServiceInitializer
import cn.graiph.blob.Blob

import cn.pandadb.blob.Blob

class AudioRecongnizer extends PropertyExtractor with ServiceInitializer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cn.aipm.image

import cn.aipm.service.ServiceInitializer
import cn.graiph.PropertyExtractor
import cn.graiph.blob.Blob
import cn.pandadb.cypherplus.PropertyExtractor
import cn.pandadb.blob.Blob

class DogOrCatClassifier extends PropertyExtractor with ServiceInitializer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package cn.aipm.image

import cn.graiph.SetComparator
import cn.pandadb.cypherplus.SetComparator
import cn.aipm.service.ServiceInitializer
import cn.graiph.blob.Blob

import cn.pandadb.blob.Blob

class FaceSimilarityComparator extends SetComparator with ServiceInitializer {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package cn.aipm.image

import javax.imageio.ImageIO

import cn.graiph.PropertyExtractor
import cn.graiph.blob.Blob
import cn.graiph.util.Configuration
import cn.pandadb.cypherplus.PropertyExtractor
import cn.pandadb.blob.Blob
import cn.pandadb.util.{ContextMap, Configuration}

/**
* Created by bluejoe on 2019/2/17.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package cn.aipm.image

import cn.graiph.PropertyExtractor
import cn.pandadb.cypherplus.PropertyExtractor
import cn.aipm.service.ServiceInitializer
import cn.graiph.blob.Blob

import cn.pandadb.blob.Blob

class PlateNumberExtractor extends PropertyExtractor with ServiceInitializer {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package cn.aipm.service

import java.io.InputStream

import cn.graiph.AnyComparator
import cn.graiph.util.{ConfigUtils, Configuration}
import cn.pandadb.cypherplus.AnyComparator
import cn.pandadb.util.{ContextMap, ConfigUtils, Configuration}
import scala.collection.immutable.Map
import scala.util.parsing.json.JSON
import ConfigUtils._
Expand Down Expand Up @@ -47,7 +47,6 @@ class Services(private val _aipmHttpHostUrl: String) {

}


def extractPlateNumber(img1InputStream: InputStream): String = {
val serviceUrl = getServiceUrl("PlateNumber")

Expand Down Expand Up @@ -112,7 +111,6 @@ class Services(private val _aipmHttpHostUrl: String) {
}
}


def segmentText(text: String): List[String] = {
val serviceUrl = getServiceUrl("TextSegment")
val contents = Map("text" -> text)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ object WebUtils {
resStr
}


def doPost(reqUrl: String, strContents: Map[String, String] = Map(), fileContents: Map[String, File] = Map(),
inStreamContents: Map[String, InputStream] = Map()): String = {
var resStr = ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cn.aipm.text

import cn.aipm.service.ServiceInitializer
import cn.graiph.PropertyExtractor
import cn.pandadb.cypherplus.PropertyExtractor

class ChineseTokenizer extends PropertyExtractor with ServiceInitializer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cn.aipm.text

import cn.graiph.ValueComparator
import cn.graiph.util.Configuration
import cn.pandadb.cypherplus.ValueComparator
import cn.pandadb.util.{ContextMap, Configuration}
import info.debatty.java.stringsimilarity.{Cosine, Jaccard, JaroWinkler}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cn.aipm.text

import cn.aipm.service.ServiceInitializer
import cn.graiph.PropertyExtractor
import cn.pandadb.cypherplus.PropertyExtractor

class SentimentClassifier extends PropertyExtractor with ServiceInitializer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package cn.graiph.util
package cn.aipm.util

import java.io.ByteArrayOutputStream
import cn.graiph.blob.Blob
import cn.pandadb.blob.Blob
import cn.pandadb.util.{StreamUtils, Logging}
import StreamUtils._
import cn.pandadb.util.Logging
import org.apache.commons.io.IOUtils
import scala.util.parsing.json.JSON

Expand Down
41 changes: 41 additions & 0 deletions blob-commons/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<groupId>cn.pandadb</groupId>
<artifactId>parent</artifactId>
<version>0.0.2</version>
<relativePath>../</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<groupId>cn.pandadb</groupId>
<artifactId>blob-commons</artifactId>
<dependencies>
<dependency>
<groupId>cn.pandadb</groupId>
<artifactId>commons</artifactId>
<version>${pandadb.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>eu.medsea.mimeutil</groupId>
<artifactId>mime-util</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package cn.graiph.blob
package cn.pandadb.blob

import java.io.ByteArrayOutputStream

import cn.graiph.util.StreamUtils
import cn.graiph.util.StreamUtils._
import cn.pandadb.util.StreamUtils
import cn.pandadb.util.StreamUtils._

/**
* Created by bluejoe on 2019/4/18.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,48 +1,11 @@
package cn.graiph
package cn.pandadb.blob

import cn.graiph.blob.Blob
import cn.graiph.util.{Configuration, Logging}
import cn.pandadb.cypherplus._
import cn.pandadb.util.{ContextMap, PandaException, Configuration, Logging}

import scala.beans.BeanProperty
import scala.collection.mutable

trait AnyComparator {
def initialize(conf: Configuration);
}

trait ValueComparator extends AnyComparator {
def compare(a: Any, b: Any): Double;
}

trait SetComparator extends AnyComparator {
def compareAsSets(a: Any, b: Any): Array[Array[Double]];
}

/**
* Created by bluejoe on 2019/1/31.
*/
trait CustomPropertyProvider {
def getCustomProperty(x: Any, propertyName: String): Option[Any];
}

trait ValueMatcher {
def like(a: Any, b: Any, algoName: Option[String], threshold: Option[Double]): Option[Boolean];

def containsOne(a: Any, b: Any, algoName: Option[String], threshold: Option[Double]): Option[Boolean];

def containsSet(a: Any, b: Any, algoName: Option[String], threshold: Option[Double]): Option[Boolean];

/**
* compares two values
*/
def compareOne(a: Any, b: Any, algoName: Option[String]): Option[Double];

/**
* compares two objects as sets
*/
def compareSet(a: Any, b: Any, algoName: Option[String]): Option[Array[Array[Double]]];
}

object ValueType {
def typeNameOf(x: Any): String = x match {
case b: Blob => s"blob/${b.mimeType.major}".toLowerCase()
Expand Down Expand Up @@ -74,7 +37,7 @@ class CypherPluginRegistry {
@BeanProperty var extractors: Array[DomainExtractorEntry] = Array();
@BeanProperty var comparators: Array[DomainComparatorEntry] = Array();

def createCustomPropertyProvider(conf: Configuration) = new CustomPropertyProvider {
def createCustomPropertyProvider(conf: Configuration): CustomPropertyProvider = new CustomPropertyProvider {
extractors.foreach(_.extractor.initialize(conf));

//propertyName, typeName
Expand Down Expand Up @@ -113,7 +76,7 @@ class CypherPluginRegistry {
}
}

def createValueComparatorRegistry(conf: Configuration) = new ValueMatcher with Logging {
def createValueComparatorRegistry(conf: Configuration): ValueMatcher = new ValueMatcher with Logging {
type CompareAnyMethod = (Any, Any) => Any;
type CompareValueMethod = (Any, Any) => Double;
type CompareSetMethod = (Any, Any) => Array[Array[Double]];
Expand Down Expand Up @@ -181,14 +144,16 @@ class CypherPluginRegistry {
}
}

private def getMatchedComparator(compareValueOrSet: Boolean, typeA: String, typeB: String, algoName: Option[String]): Option[(CompareAnyMethod, DomainComparatorEntry)] = {
private def getMatchedComparator(compareValueOrSet: Boolean, typeA: String, typeB: String,
algoName: Option[String]): Option[(CompareAnyMethod, DomainComparatorEntry)] = {
def isEntryMatched(entry: DomainComparatorEntry, typeName: String): Boolean = {
val f = entry.domain.equalsIgnoreCase(typeName) &&
(if (compareValueOrSet)
(if (compareValueOrSet) {
entry.comparator.isInstanceOf[ValueComparator]
else
}
else {
entry.comparator.isInstanceOf[SetComparator]
)
})

algoName.map { name =>
f && entry.name.equalsIgnoreCase(name)
Expand All @@ -198,10 +163,12 @@ class CypherPluginRegistry {
}

def doCompare(comparator: AnyComparator, a: Any, b: Any): Any = {
if (compareValueOrSet)
comparator.asInstanceOf[ValueComparator].compare(a, b);
else
comparator.asInstanceOf[SetComparator].compareAsSets(a, b);
if (compareValueOrSet) {
comparator.asInstanceOf[ValueComparator].compare(a, b)
}
else {
comparator.asInstanceOf[SetComparator].compareAsSets(a, b)
}
}

comparators.find(isEntryMatched(_, ValueType.concat(typeA, typeB)))
Expand Down Expand Up @@ -250,16 +217,17 @@ class CypherPluginRegistry {
}

class UnknownPropertyException(name: String, x: Any)
extends RuntimeException(s"unknown property `$name` for $x") {
extends PandaException(s"unknown property `$name` for $x") {

}

class NoSuitableComparatorException(a: Any, b: Any, algoName: Option[String])
extends RuntimeException(s"no suiltable comparator: ${ValueType.typeNameOf(a)} and ${ValueType.typeNameOf(b)}, algorithm name: ${algoName.getOrElse("(none)")}") {
extends PandaException(s"no suiltable comparator: ${ValueType.typeNameOf(a)} and ${ValueType.typeNameOf(b)}," +
s" algorithm name: ${algoName.getOrElse("(none)")}") {

}

class TooManyObjectsException(o: Any)
extends RuntimeException(s"too many objects: $o") {
extends PandaException(s"too many objects: $o") {

}
Loading