Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
0d2a634
Implement PartitionedFileFragment
blrunner Oct 28, 2015
4d7e73b
Add unit test cases for PartitionedFileFragment
blrunner Oct 28, 2015
6fab5ad
Add PartitionedTableUtil for finding filtered partition directories.
blrunner Oct 29, 2015
b3bbcd1
Remove the array of partition directories of rerwrite rule and apply …
blrunner Nov 2, 2015
25163d0
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Nov 2, 2015
4f711fa
Remove unnecessary method
blrunner Nov 2, 2015
33dc140
Update comments
blrunner Nov 2, 2015
dede3e2
Remove unnecessary constructor parameter of PhysicalPlannerImpl
blrunner Nov 2, 2015
ccc4f6c
Remove unnecessary parameter of PartitionedTableUtil::buildTupleFromP…
blrunner Nov 2, 2015
d5f563a
Update wrong indent
blrunner Nov 2, 2015
086b02b
Remove unused package
blrunner Nov 2, 2015
22731ec
Update wrong comparison operator
blrunner Nov 2, 2015
437f5ec
Update log message
blrunner Nov 2, 2015
d76f41a
When rewriting PartitionedTableScanNode, set partition paths and tabl…
blrunner Nov 3, 2015
126f5e0
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Nov 3, 2015
9112ceb
Update the result message of partition pruning
blrunner Nov 3, 2015
71d65a5
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Nov 5, 2015
c53dfab
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Nov 6, 2015
a3af9ad
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Nov 10, 2015
548bd42
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Nov 19, 2015
66c1c49
Remove unused member variable.
blrunner Nov 20, 2015
25e2366
Remove unused method
blrunner Nov 20, 2015
c7f89f7
Separate partition processing logic from existing split method.
blrunner Nov 20, 2015
e670f25
Rename partitionName to partitionKeys in PartitionedFileFragmentProto
blrunner Nov 20, 2015
83065d6
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Nov 21, 2015
c21d065
Rename PartitionedFileFragment to PartitionFileFragment
blrunner Nov 21, 2015
9d92e54
Recover partition paths in LogicalNode
blrunner Nov 21, 2015
f9fcd27
Add PartitionedTableWriter::buildTupleFromPartitionName
blrunner Nov 21, 2015
344384b
PartitionedTableRewriter should set PartitionContent
blrunner Nov 23, 2015
b327993
Remove unused packages
blrunner Nov 23, 2015
22d3ad7
Remove unused package
blrunner Nov 23, 2015
9009b2a
Remove unused class
blrunner Nov 23, 2015
92063a0
Implement FileTableSpace::makeNonPartitionSplit
blrunner Nov 23, 2015
fc6043f
Update the line of added methods in FileTablespace
blrunner Nov 23, 2015
3fe18c9
Implement FileTableSpace::partitionSplit
blrunner Nov 23, 2015
fc16d15
Added simple description for splitting partitioned table
blrunner Nov 23, 2015
7e35b06
Fix bugs
blrunner Nov 23, 2015
e371275
Rename fileFragments to partitionFileFragments
blrunner Nov 23, 2015
fdeeb79
Remove codes for checking the NULL of partition keys
blrunner Nov 23, 2015
0e7ce93
Rename keys to partitionKeys in PlanProto
blrunner Nov 23, 2015
80a872c
Update description
blrunner Nov 23, 2015
8e11cbc
Remove unnecessary updates
blrunner Nov 23, 2015
7596c3c
Remove unncessary method
blrunner Nov 23, 2015
56ec31a
Remove unused packages
blrunner Nov 23, 2015
1735d67
Update PartitionedTableRewriter::getPartitionContentByFileSystem
blrunner Nov 23, 2015
e062a72
Remove unused constructor
blrunner Nov 24, 2015
390ee45
Transmit ScanNode instead of PartitionedTableScanNode
blrunner Nov 24, 2015
f24577a
Remove unused package
blrunner Nov 24, 2015
c4c4d36
Remove unnnecessary codes
blrunner Nov 24, 2015
b428f24
Remove unnecessary modification
blrunner Nov 24, 2015
772c049
Implement unit test cases for PartitionedTableRewriter
blrunner Nov 25, 2015
3939b68
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Nov 25, 2015
3f5f238
Trigger for travis CI build
blrunner Nov 25, 2015
915c5c6
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Nov 26, 2015
586030b
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Dec 2, 2015
eed923b
Remove unused methods
blrunner Dec 2, 2015
224dfc2
Remove previous split size
blrunner Dec 3, 2015
e390fc6
Mark final keword to all member variables in PartitionFragement
blrunner Dec 3, 2015
707866a
Add more description
blrunner Dec 3, 2015
dc67e05
Apply lamda expression
blrunner Dec 3, 2015
8e5f257
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Dec 3, 2015
8a52561
Implement methods for PartitionFileFragment to S3TableSpace
blrunner Dec 3, 2015
52b3790
Revert "Implement methods for PartitionFileFragment to S3TableSpace"
blrunner Dec 3, 2015
c1e6fff
Merge branch 'TAJO-1952' of https://github.com/blrunner/tajo into TAJ…
blrunner Dec 3, 2015
d8f1186
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Dec 3, 2015
4580f53
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Dec 7, 2015
69e6c61
Add dist id to PartitionFileFragment
blrunner Dec 7, 2015
28edf6c
PartitionFileFragment extends FileFragment
blrunner Dec 7, 2015
8446fc3
Trigger for tavis ci build
blrunner Dec 7, 2015
c8f041e
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Dec 7, 2015
9407a88
Trigger for Travis CI build
blrunner Dec 7, 2015
8c05203
Add debug logs
blrunner Dec 9, 2015
909a601
Fix unit test bug
blrunner Dec 9, 2015
4ab2b51
Remove comments
blrunner Dec 10, 2015
c2a5aae
Remove debug logs
blrunner Dec 10, 2015
14374cd
Rename buildTupleFromPartitionName to buildTupleFromPartitionKeys
blrunner Dec 10, 2015
26cab49
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Dec 10, 2015
e015415
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Dec 11, 2015
d233218
Add messages for printing elapsed time.
blrunner Dec 15, 2015
135f530
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Dec 15, 2015
1790fb0
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Dec 30, 2015
490cb1a
Trigger for travis CI build
blrunner Jan 5, 2016
ec10d1c
Trigger for Travis CI build
blrunner Jan 7, 2016
633edc1
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Jan 7, 2016
a96c653
Trigger CI build
blrunner Jan 7, 2016
f7c5149
Remove TUtil::newList
blrunner Jan 8, 2016
520c57b
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Jan 13, 2016
145b8b2
TAJO-2063: Refactor FileTablespace::commitOutputData.
blrunner Feb 1, 2016
61a0c68
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 1, 2016
cdcbc54
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 1, 2016
17b3204
TAJO-2069: Remove getContentsSummary in TableSpace and Query.
blrunner Feb 1, 2016
1948c5c
Implement unit test cases
blrunner Feb 1, 2016
322ab83
Add log messages
blrunner Feb 1, 2016
21382dd
Apply parallelStream
blrunner Feb 1, 2016
add682c
Merge branch 'TAJO-2063' of https://github.com/blrunner/tajo into TAJ…
blrunner Feb 1, 2016
f9d9afa
Update max retry count for avoiding NoHttpResponseException.
blrunner Feb 1, 2016
faf383e
Trigger for CI build
blrunner Feb 1, 2016
cf1f224
Merge branch 'TAJO-2063' of https://github.com/blrunner/tajo into TAJ…
blrunner Feb 1, 2016
2099ad9
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 1, 2016
fec2ff1
Replace parallelStream to Stream
blrunner Feb 1, 2016
908d8f8
Merge branch 'TAJO-2063' of https://github.com/blrunner/tajo into TAJ…
blrunner Feb 1, 2016
dfa58f9
Replace List type to Set type with ConcurrentHashMap
blrunner Feb 2, 2016
2a37659
Merge branch 'TAJO-2063' of https://github.com/blrunner/tajo into TAJ…
blrunner Feb 2, 2016
b548b1b
Use parallelStream instead of stream
blrunner Feb 2, 2016
5120db8
Merge branch 'TAJO-2063' of https://github.com/blrunner/tajo into TAJ…
blrunner Feb 2, 2016
da00b48
Rename PartitionContent to PartitionPruningHandle
blrunner Feb 2, 2016
3cce3f4
Rename method names
blrunner Feb 2, 2016
7e4b115
Check if staging directory exits
blrunner Feb 2, 2016
4757cb9
Merge branch 'TAJO-2063' of https://github.com/blrunner/tajo into TAJ…
blrunner Feb 2, 2016
1458ebf
Update max-retry-count
blrunner Feb 2, 2016
1565788
Replace parallelStream to stream
blrunner Feb 2, 2016
5a08e43
Merge branch 'TAJO-2063' of https://github.com/blrunner/tajo into TAJ…
blrunner Feb 2, 2016
c78d2b8
Remove TAJO-2063 dependency
blrunner Feb 3, 2016
878ece3
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 4, 2016
8040422
Add calculateSize to TableSpace
blrunner Feb 4, 2016
13239ea
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 5, 2016
2ae68cb
Remove hadoop-aws dependency
blrunner Feb 5, 2016
61ce300
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 11, 2016
8f61db1
Remove hadoop-aws dependency
blrunner Feb 11, 2016
00b564b
Apply AmazonSDK 1.7.4
blrunner Feb 11, 2016
3f7b9fb
Remove unnecessary updates
blrunner Feb 11, 2016
48a14c0
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 11, 2016
ee414e9
Trigger for Travis CI build
blrunner Feb 11, 2016
b5eb386
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 16, 2016
2f9140c
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 16, 2016
0e7a13b
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 17, 2016
913d162
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 17, 2016
1686e54
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 17, 2016
76c8b38
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 17, 2016
06d7458
Trigger travis CI build
blrunner Feb 18, 2016
277bddb
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 19, 2016
df30b17
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 19, 2016
a776c66
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 22, 2016
635fd75
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Feb 22, 2016
e82ebef
Trigger for travis CI build
blrunner Feb 22, 2016
3b8d72c
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 7, 2016
37e1602
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 7, 2016
5a7b4e2
Trigger for travis CI build
blrunner Mar 7, 2016
1d0f5e2
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 18, 2016
dba96ea
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 18, 2016
deaacad
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 18, 2016
29bd1b5
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 18, 2016
7790f3e
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 18, 2016
36616d0
PartitionedTableRewriter just rewrite ScanNode to PartitionedTableSca…
blrunner Mar 21, 2016
3370a10
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 21, 2016
8f3e728
Remove unnecessary codes
blrunner Mar 21, 2016
7d4bbed
Fix bugs in TestMultipleJoinTypes::testInnerAndOuterWithEmpty
blrunner Mar 22, 2016
8036ed3
Show informs of PartitionFileFragment on web UI
blrunner Mar 22, 2016
b335fde
Remove informs of PartitionFileFragment on web UI
blrunner Mar 23, 2016
6c855bf
Add dependency scope because aws sdk conflict on EMR
blrunner Mar 23, 2016
dd00174
Move isPartitionSplittable to right position
blrunner Mar 23, 2016
a4c53ee
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 23, 2016
269bf00
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 24, 2016
cbccf4f
Make directory which includes aws s3 dependencies
blrunner Mar 24, 2016
983c5f2
Use the uri of table instead of the default filesystem uri
blrunner Mar 24, 2016
b0720d3
Recover OrcScanner
blrunner Mar 25, 2016
606d007
Trigger for travis CI build
blrunner Mar 25, 2016
fcd30e4
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 28, 2016
553758a
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 28, 2016
9dc07f6
Fix a build bug
blrunner Mar 28, 2016
47ecc70
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Mar 30, 2016
f646882
Merge branch 'TAJO-2069' of https://github.com/blrunner/tajo into TAJ…
blrunner Mar 30, 2016
c806203
Merge branch 'TAJO-1952' of https://github.com/blrunner/tajo into s3-…
blrunner Apr 1, 2016
d7b4cde
Merge branch 'TAJO-2069' of https://github.com/blrunner/tajo into s3-…
blrunner Apr 1, 2016
7e745ca
Improve to execute simple query for partition table with AWS S3
blrunner Apr 3, 2016
84c62fb
Refactor methods for splitting partition fragment
blrunner Apr 4, 2016
7e8ba5f
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 4, 2016
2d474ef
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 4, 2016
a05784f
Merge branch 'TAJO-1952' of https://github.com/blrunner/tajo into s3-…
blrunner Apr 4, 2016
287ca09
Add S3TableSpace::getFilteredPrefixList
blrunner Apr 4, 2016
245c3fa
Implement to list S3 Objects by marker
blrunner Apr 4, 2016
e4200db
Separate a method to make FileStatus using S3ObjectSummary
blrunner Apr 4, 2016
dbf8b31
Remove unnecessary packages
blrunner Apr 4, 2016
8481b45
Trigger for travis CI build
blrunner Apr 5, 2016
0f0a3d2
Remove unnecessary modifications
blrunner Apr 5, 2016
2b9ddce
Remove unnecessary modifications
blrunner Apr 5, 2016
d2f4aed
Merge branch 'TAJO-1952' of https://github.com/blrunner/tajo into s3-…
blrunner Apr 5, 2016
3c731c5
Remove unnecessary modifications
blrunner Apr 5, 2016
0d4c7c3
Fix a bug about multi-level partition
blrunner Apr 5, 2016
fd11849
Clean up codes
blrunner Apr 6, 2016
1565bae
Move local variable location
blrunner Apr 6, 2016
df1c499
Initalize next partition path
blrunner Apr 6, 2016
9b82f4b
Add debug logs
blrunner Apr 7, 2016
657012c
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 19, 2016
7f2ab0f
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 19, 2016
b32e1a5
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 19, 2016
dd6e955
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 21, 2016
92bc2a6
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 21, 2016
90a208b
Merge branch 'TAJO-1952' of https://github.com/blrunner/tajo into s3-…
blrunner Apr 21, 2016
fc0cbe1
Merge branch 'TAJO-2069' of https://github.com/blrunner/tajo into s3-…
blrunner Apr 21, 2016
299fbe9
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 22, 2016
2134fa6
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 22, 2016
7ac8074
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 22, 2016
b9149c8
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 25, 2016
bfe3c07
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 28, 2016
5fb8ed0
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 28, 2016
6640ae2
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 29, 2016
e4e20ef
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner Apr 29, 2016
8ac41cb
Merge branch 'TAJO-1952' of https://github.com/blrunner/tajo into s3-…
blrunner Apr 29, 2016
2086fb8
Merge branch 'TAJO-2069' of https://github.com/blrunner/tajo into s3-…
blrunner Apr 29, 2016
5a9d953
Clean up S3TableSpace::getFragmentsByMarker
blrunner Apr 29, 2016
2dcc5c0
Fix a bug for checking first phase
blrunner Apr 29, 2016
9f21bc5
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner May 8, 2016
bd54c99
Fix a bug of unit tests
blrunner May 8, 2016
0b813ad
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner May 8, 2016
1e5e794
Merge branch 'TAJO-1952' of https://github.com/blrunner/tajo into s3-…
blrunner May 8, 2016
bbbf98c
Merge branch 'TAJO-2069' of https://github.com/blrunner/tajo into s3-…
blrunner May 8, 2016
8462c51
Remove QueryTestCaseBase from TestPartitionedTableRewriter
blrunner May 9, 2016
2666559
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner May 12, 2016
e703126
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo…
blrunner May 12, 2016
a440b5c
Add order by clause to AbstractDBStore::getPartitionsOfTable
blrunner May 12, 2016
b6260ed
Merge branch 'TAJO-1952' of https://github.com/blrunner/tajo into s3-…
blrunner May 12, 2016
2a62598
Merge branch 'TAJO-2069' of https://github.com/blrunner/tajo into s3-…
blrunner May 12, 2016
da755d9
Fix unit test bugs
blrunner May 13, 2016
15f97fd
Remove codes for Stream::anyMatch
blrunner May 13, 2016
fd8f144
Remove unused package
blrunner May 13, 2016
26be5a0
Merge branch 'TAJO-1952' of https://github.com/blrunner/tajo into s3-…
blrunner May 13, 2016
8a9837c
Clean up test codes
blrunner May 13, 2016
69b83e6
Merge branch 'TAJO-1952' of https://github.com/blrunner/tajo into s3-…
blrunner May 13, 2016
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
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Tajo Change Log

Release 0.12.0 - unreleased


NEW FEATURES

TAJO-1686: Allow Tajo to use Hive UDF. (jihoon)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ public static TableDesc newTableDesc(String tableName, Schema schema, TableMeta
return new TableDesc(tableName, schema, meta, path.toUri());
}

public static TableDesc newTableDesc(String tableName, Schema schema, TableMeta meta, Path path
, PartitionMethodDesc partitionMethodDesc) {
return new TableDesc(tableName, schema, meta, path.toUri(), partitionMethodDesc);
}

public static TableDesc newTableDesc(TableDescProto proto) {
return new TableDesc(proto);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,46 @@ public class TableDesc implements ProtoObject<TableDescProto>, GsonObject, Clone
public TableDesc() {
}

public TableDesc(String tableName, @Nullable Schema schema, TableMeta meta, @Nullable URI uri, boolean external) {
this(tableName, schema, meta, uri, null, external);
}

public TableDesc(String tableName, @Nullable Schema schema, TableMeta meta,
@Nullable URI uri, boolean external) {
@Nullable URI uri, @Nullable PartitionMethodDesc partitionMethodDesc, boolean external) {
this.tableName = tableName;
this.schema = schema;
this.meta = meta;
this.uri = uri;
this.partitionMethodDesc = partitionMethodDesc;
this.external = external;
}

public TableDesc(String tableName, @Nullable Schema schema, TableMeta meta, @Nullable URI path) {
this(tableName, schema, meta, path, true);
this(tableName, schema, meta, path, null, true);
}


public TableDesc(String tableName, @Nullable Schema schema, TableMeta meta, @Nullable URI path,
@Nullable PartitionMethodDesc partitionMethodDesc) {
this(tableName, schema, meta, path, partitionMethodDesc, true);
}

public TableDesc(String tableName, @Nullable Schema schema, String dataFormat, KeyValueSet options,
@Nullable URI path) {
this(tableName, schema, new TableMeta(dataFormat, options), path);
}

public TableDesc(TableDescProto proto) {

public TableDesc(String tableName, @Nullable Schema schema, String dataFormat, KeyValueSet options,
@Nullable URI path, @Nullable PartitionMethodDesc partitionMethodDesc) {
this(tableName, schema, new TableMeta(dataFormat, options), path, partitionMethodDesc);
}

public TableDesc(TableDescProto proto) {
this(proto.getTableName(), proto.hasSchema() ? SchemaFactory.newV1(proto.getSchema()) : null,
new TableMeta(proto.getMeta()), proto.hasPath() ? URI.create(proto.getPath()) : null, proto.getIsExternal());
new TableMeta(proto.getMeta()), proto.hasPath() ? URI.create(proto.getPath()) : null,
proto.hasPartition() ? new PartitionMethodDesc(proto.getPartition()) : null,
proto.getIsExternal());
if(proto.hasStats()) {
this.stats = new TableStats(proto.getStats());
}
if (proto.hasPartition()) {
this.partitionMethodDesc = new PartitionMethodDesc(proto.getPartition());
}
}

Expand Down
9 changes: 9 additions & 0 deletions tajo-common/src/main/java/org/apache/tajo/conf/TajoConf.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,15 @@ public static enum ConfVars implements ConfigKey {
// for RCFile
HIVEUSEEXPLICITRCFILEHEADER("tajo.exec.rcfile.use.explicit.header", true, Validators.bool()),

// S3 Configuration --------------------------------------------------
S3_MAX_ERROR_RETRIES("tajo.s3.max-error-retries", 10),
S3_SSL_ENABLED("tajo.s3.ssl.enabled", true),
S3_CONNECT_TIMEOUT("tajo.s3.connect-timeout", "5m"),
S3_SOCKET_TIMEOUT("tajo.s3.socket-timeout", "5m"),
S3_MAX_CONNECTIONS("tajo.s3.max-connections", 500),
S3_USE_INSTANCE_CREDENTIALS("tajo.s3.use-instance-credentials", true),
S3_PIN_CLIENT_TO_CURRENT_REGION("tajo.s3.pin-client-to-current-region", false),

// RPC --------------------------------------------------------------------
// Internal RPC Client
INTERNAL_RPC_CLIENT_WORKER_THREAD_NUM("tajo.internal.rpc.client.worker-thread-num",
Expand Down
38 changes: 38 additions & 0 deletions tajo-common/src/main/java/org/apache/tajo/util/FileUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,42 @@ public static void cleanupAndthrowIfFailed(java.io.Closeable... closeables) thro
throw ioe;
}
}

public static String getCommonPrefix(Path... paths){
String prefix = "";
String[][] folders = new String[paths.length][];

// split on file separator
for(int i = 0; i < paths.length; i++){
folders[i] = paths[i].toString().split("/");
}

for(int j = 0; j < folders[0].length; j++){
// grab the next folder name in the first path
String thisFolder = folders[0][j];
// assume all have matched in case there are no more paths
boolean allMatched = true;

// look at the other paths
for(int i = 1; i < folders.length && allMatched; i++){
// if there is no folder here
if(folders[i].length < j){
allMatched = false;
// stop looking because we've gone as far as we can
break;
}
// check if it matched
allMatched &= folders[i][j].equals(thisFolder);
}
// if they all matched this folder name
if(allMatched) {
// add it to the answer
prefix += thisFolder + "/";
} else {
break;
}
}

return prefix;
}
}
Loading