[GitHub] carbondata pull request #2125: [CARBONDATA-2299]Support showing all segment ...

2018-04-07 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/carbondata/pull/2125


---


[GitHub] carbondata pull request #2125: [CARBONDATA-2299]Support showing all segment ...

2018-04-02 Thread zzcclp
Github user zzcclp commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2125#discussion_r178699449
  
--- Diff: 
integration/spark2/src/test/scala/org/apache/spark/util/CarbonCommandSuite.scala
 ---
@@ -190,4 +190,21 @@ class CarbonCommandSuite extends Spark2QueryTest with 
BeforeAndAfterAll {
 dropTable(tableName)
   }
 
+  test("show history segments") {
+val tableName = "test_tablestatus_history"
+sql(s"drop table if exists ${tableName}")
+sql(s"create table ${tableName} (name String, age int) stored by 
'carbondata' "
+  + 
"TBLPROPERTIES('AUTO_LOAD_MERGE'='true','COMPACTION_LEVEL_THRESHOLD'='2,2')")
+val carbonTable = 
CarbonMetadata.getInstance().getCarbonTable("default", tableName)
+sql(s"insert into ${tableName} select 'abc1',1")
+sql(s"insert into ${tableName} select 'abc2',2")
+sql(s"insert into ${tableName} select 'abc3',3")
+assert(sql(s"show segments for table ${tableName}").collect().length 
== 4)
+assert(sql(s"show history segments for table 
${tableName}").collect().length == 4)
+sql(s"clean files for table ${tableName}")
+assert(sql(s"show segments for table ${tableName}").collect().length 
== 2)
+assert(sql(s"show history segments for table 
${tableName}").collect().length == 4)
--- End diff --

Done


---


[GitHub] carbondata pull request #2125: [CARBONDATA-2299]Support showing all segment ...

2018-04-01 Thread jackylk
Github user jackylk commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2125#discussion_r178457078
  
--- Diff: 
integration/spark2/src/test/scala/org/apache/spark/util/CarbonCommandSuite.scala
 ---
@@ -190,4 +190,21 @@ class CarbonCommandSuite extends Spark2QueryTest with 
BeforeAndAfterAll {
 dropTable(tableName)
   }
 
+  test("show history segments") {
+val tableName = "test_tablestatus_history"
+sql(s"drop table if exists ${tableName}")
+sql(s"create table ${tableName} (name String, age int) stored by 
'carbondata' "
+  + 
"TBLPROPERTIES('AUTO_LOAD_MERGE'='true','COMPACTION_LEVEL_THRESHOLD'='2,2')")
+val carbonTable = 
CarbonMetadata.getInstance().getCarbonTable("default", tableName)
+sql(s"insert into ${tableName} select 'abc1',1")
+sql(s"insert into ${tableName} select 'abc2',2")
+sql(s"insert into ${tableName} select 'abc3',3")
+assert(sql(s"show segments for table ${tableName}").collect().length 
== 4)
+assert(sql(s"show history segments for table 
${tableName}").collect().length == 4)
+sql(s"clean files for table ${tableName}")
+assert(sql(s"show segments for table ${tableName}").collect().length 
== 2)
+assert(sql(s"show history segments for table 
${tableName}").collect().length == 4)
--- End diff --

can you assert the segment name in the collect result


---


[GitHub] carbondata pull request #2125: [CARBONDATA-2299]Support showing all segment ...

2018-03-31 Thread zzcclp
GitHub user zzcclp opened a pull request:

https://github.com/apache/carbondata/pull/2125

[CARBONDATA-2299]Support showing all segment information(include visible 
and invisible segments)


Use command 'SHOW HISTORY SEGMENTS' to show all segment information(include 
visible and invisible segments)

Be sure to do all of the following checklist to help us incorporate 
your contribution quickly and easily:

 - [ ] Any interfaces changed?
 
 - [ ] Any backward compatibility impacted?  No
 
 - [ ] Document update required?  No

 - [ ] Testing done
Please provide details on 
- Whether new unit test cases have been added or why no new tests 
are required?
- How it is tested? Please attach test report.
- Is it a performance related change? Please attach the performance 
test report.
- Any additional information to help reviewers in testing this 
change.
   
 - [ ] For large changes, please consider breaking it into sub-tasks under 
an umbrella JIRA. 



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zzcclp/carbondata CARBONDATA-2299

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/carbondata/pull/2125.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2125


commit a500471ec14da110130ca4f2aa43963de7e75dc1
Author: Zhang Zhichao <441586683@...>
Date:   2018-04-01T02:05:05Z

[CARBONDATA-2299]Support showing all segment information(include visible 
and invisible segments)

Use command 'SHOW HISTORY SEGMENTS' to show all segment information(include 
visible and invisible segments)




---