Repository: incubator-gearpump
Updated Branches:
  refs/heads/master 177a1d443 -> eaf5b6cb2


[GEARPUMP-256] Camel-Case as variable name

[Camel-Case as variable 
name](https://issues.apache.org/jira/browse/GEARPUMP-256) HBaseSink's naming 
and using Camel-Case as the variable name.

Author: darionyaphet <[email protected]>

Closes #125 from darionyaphet/GEARPUMP-256.


Project: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-gearpump/commit/eaf5b6cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/tree/eaf5b6cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/diff/eaf5b6cb

Branch: refs/heads/master
Commit: eaf5b6cb27d4f3c0961dd9336671c10ef3e86174
Parents: 177a1d4
Author: darionyaphet <[email protected]>
Authored: Mon Dec 26 20:33:17 2016 +0800
Committer: manuzhang <[email protected]>
Committed: Mon Dec 26 20:33:17 2016 +0800

----------------------------------------------------------------------
 .../gearpump/external/hbase/HBaseSink.scala     | 20 ++++++++++----------
 .../gearpump/services/MasterService.scala       |  6 +++---
 2 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/eaf5b6cb/external/hbase/src/main/scala/org/apache/gearpump/external/hbase/HBaseSink.scala
----------------------------------------------------------------------
diff --git 
a/external/hbase/src/main/scala/org/apache/gearpump/external/hbase/HBaseSink.scala
 
b/external/hbase/src/main/scala/org/apache/gearpump/external/hbase/HBaseSink.scala
index f85c43b..4b41ba1 100644
--- 
a/external/hbase/src/main/scala/org/apache/gearpump/external/hbase/HBaseSink.scala
+++ 
b/external/hbase/src/main/scala/org/apache/gearpump/external/hbase/HBaseSink.scala
@@ -31,22 +31,22 @@ import org.apache.hadoop.hbase.util.Bytes
 import org.apache.hadoop.hbase.{HBaseConfiguration, TableName}
 import org.apache.hadoop.security.UserGroupInformation
 
-class HBaseSink(userconfig: UserConfig, tableName: String,
+class HBaseSink(userConfig: UserConfig, tableName: String,
     val conn: (UserConfig, Configuration)
     => Connection, @transient var configuration: Configuration)
   extends DataSink {
 
-  lazy val connection = conn(userconfig, configuration)
+  lazy val connection = conn(userConfig, configuration)
   lazy val table = connection.getTable(TableName.valueOf(tableName))
 
   override def open(context: TaskContext): Unit = {}
 
-  def this(userconfig: UserConfig, tableName: String, configuration: 
Configuration) = {
-    this(userconfig, tableName, HBaseSink.getConnection, configuration)
+  def this(userConfig: UserConfig, tableName: String, configuration: 
Configuration) = {
+    this(userConfig, tableName, HBaseSink.getConnection, configuration)
   }
 
-  def this(userconfig: UserConfig, tableName: String) = {
-    this(userconfig, tableName, HBaseConfiguration.create())
+  def this(userConfig: UserConfig, tableName: String) = {
+    this(userConfig, tableName, HBaseConfiguration.create())
   }
 
   def insert(rowKey: String, columnGroup: String, columnName: String, value: 
String): Unit = {
@@ -120,14 +120,14 @@ object HBaseSink {
   val COLUMN_NAME = "hbase.table.column.name"
   val HBASE_USER = "hbase.user"
 
-  def apply[T](userconfig: UserConfig, tableName: String, configuration: 
Configuration)
+  def apply[T](userConfig: UserConfig, tableName: String, configuration: 
Configuration)
   : HBaseSink = {
-    new HBaseSink(userconfig, tableName, configuration)
+    new HBaseSink(userConfig, tableName, configuration)
   }
 
-  def apply[T](userconfig: UserConfig, tableName: String)
+  def apply[T](userConfig: UserConfig, tableName: String)
   : HBaseSink = {
-    new HBaseSink(userconfig, tableName)
+    new HBaseSink(userConfig, tableName)
   }
 
   private def getConnection(userConfig: UserConfig, configuration: 
Configuration): Connection = {

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/eaf5b6cb/services/jvm/src/main/scala/org/apache/gearpump/services/MasterService.scala
----------------------------------------------------------------------
diff --git 
a/services/jvm/src/main/scala/org/apache/gearpump/services/MasterService.scala 
b/services/jvm/src/main/scala/org/apache/gearpump/services/MasterService.scala
index b08e0fd..62a431a 100644
--- 
a/services/jvm/src/main/scala/org/apache/gearpump/services/MasterService.scala
+++ 
b/services/jvm/src/main/scala/org/apache/gearpump/services/MasterService.scala
@@ -159,7 +159,7 @@ class MasterService(val master: ActorRef,
         entity(as[String]) { request =>
           val msg = java.net.URLDecoder.decode(request, "UTF-8")
           val submitApplicationRequest = read[SubmitApplicationRequest](msg)
-          import submitApplicationRequest.{appName, dag, processors, 
userconfig}
+          import submitApplicationRequest.{appName, dag, processors, 
userConfig}
           val context = ClientContext(system.settings.config, system, master)
 
           val graph = dag.mapVertex { processorId =>
@@ -168,7 +168,7 @@ class MasterService(val master: ActorRef,
             PartitionerDescription(new PartitionerByClassName(edge))
           }
 
-          val effectiveConfig = if (userconfig == null) UserConfig.empty else 
userconfig
+          val effectiveConfig = if (userConfig == null) UserConfig.empty else 
userConfig
           val appId = context.submit(new StreamApplication(appName, 
effectiveConfig, graph))
 
           import upickle.default.write
@@ -345,5 +345,5 @@ object MasterService {
       appName: String,
       processors: Map[ProcessorId, ProcessorDescription],
       dag: Graph[Int, String],
-      userconfig: UserConfig)
+      userConfig: UserConfig)
 }

Reply via email to