[GitHub] carbondata pull request #2163: [CARBONDATA-2311][Streaming] Fix bug to avoid...

2018-04-12 Thread QiangCai
Github user QiangCai closed the pull request at:

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


---


[GitHub] carbondata pull request #2163: [CARBONDATA-2311][Streaming] Fix bug to avoid...

2018-04-12 Thread QiangCai
Github user QiangCai commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2163#discussion_r181008981
  
--- Diff: 
streaming/src/main/scala/org/apache/carbondata/streaming/StreamSinkFactory.scala
 ---
@@ -45,11 +50,41 @@ import 
org.apache.carbondata.streaming.segment.StreamSegment
  */
 object StreamSinkFactory {
 
+  val LOGGER = 
LogServiceFactory.getLogService(this.getClass.getCanonicalName)
+
+  val locks = new util.concurrent.ConcurrentHashMap[String, ICarbonLock]()
+
+  def lock(carbonTable: CarbonTable): Unit = {
--- End diff --

ok, I will modify it in the future.
This is a synchronized pr, better to keep same with previous.


---


[GitHub] carbondata pull request #2163: [CARBONDATA-2311][Streaming] Fix bug to avoid...

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

https://github.com/apache/carbondata/pull/2163#discussion_r180990390
  
--- Diff: 
streaming/src/main/scala/org/apache/carbondata/streaming/StreamSinkFactory.scala
 ---
@@ -45,11 +50,41 @@ import 
org.apache.carbondata.streaming.segment.StreamSegment
  */
 object StreamSinkFactory {
 
+  val LOGGER = 
LogServiceFactory.getLogService(this.getClass.getCanonicalName)
+
+  val locks = new util.concurrent.ConcurrentHashMap[String, ICarbonLock]()
+
+  def lock(carbonTable: CarbonTable): Unit = {
--- End diff --

I think it is not intuitive to have lock/unlock function in a Factory 
class. Can you put it in other place


---


[GitHub] carbondata pull request #2163: [CARBONDATA-2311][Streaming] Fix bug to avoid...

2018-04-12 Thread QiangCai
Github user QiangCai commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2163#discussion_r180975541
  
--- Diff: 
streaming/src/main/scala/org/apache/spark/sql/execution/streaming/CarbonAppendableStreamSink.scala
 ---
@@ -41,7 +41,7 @@ import 
org.apache.carbondata.core.dictionary.server.DictionaryServer
 import org.apache.carbondata.core.metadata.schema.table.CarbonTable
 import org.apache.carbondata.core.stats.QueryStatistic
 import org.apache.carbondata.core.util.CarbonProperties
-import org.apache.carbondata.core.util.path.CarbonStorePath
+import org.apache.carbondata.core.util.path.{CarbonStorePath, 
CarbonTablePath}
--- End diff --

fixed


---


[GitHub] carbondata pull request #2163: [CARBONDATA-2311][Streaming] Fix bug to avoid...

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

https://github.com/apache/carbondata/pull/2163#discussion_r180972418
  
--- Diff: 
streaming/src/main/scala/org/apache/spark/sql/execution/streaming/CarbonAppendableStreamSink.scala
 ---
@@ -41,7 +41,7 @@ import 
org.apache.carbondata.core.dictionary.server.DictionaryServer
 import org.apache.carbondata.core.metadata.schema.table.CarbonTable
 import org.apache.carbondata.core.stats.QueryStatistic
 import org.apache.carbondata.core.util.CarbonProperties
-import org.apache.carbondata.core.util.path.CarbonStorePath
+import org.apache.carbondata.core.util.path.{CarbonStorePath, 
CarbonTablePath}
--- End diff --

don't need to import CarbonTablePath, remove


---


[GitHub] carbondata pull request #2163: [CARBONDATA-2311][Streaming] Fix bug to avoid...

2018-04-11 Thread QiangCai
GitHub user QiangCai opened a pull request:

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

[CARBONDATA-2311][Streaming] Fix bug to avoid to append data to strea…


At the begin of each micro batch, check the status of current segment.if 
the status is streaming, continue to use this segment
if the status is streaming finish, open new streaming segment to accept new 
streaming data

This closes #2135

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?
 
 - [ ] Document update required?

 - [ ] 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/QiangCai/carbondata pr2135_branch1_3

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

https://github.com/apache/carbondata/pull/2163.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 #2163


commit 2f2bb3e9ef2b28004b5f245517d1af91f56da944
Author: QiangCai 
Date:   2018-04-03T06:32:59Z

[CARBONDATA-2311][Streaming] Fix bug to avoid to append data to streaming 
finish segment

At the begin of each micro batch, check the status of current segment.if 
the status is streaming, continue to use this segment
if the status is streaming finish, open new streaming segment to accept new 
streaming data

This closes #2135




---