diff options
-rw-r--r-- | scalding/build.sbt | 8 | ||||
-rw-r--r-- | scalding/scalastyle-config.xml | 11 | ||||
-rw-r--r-- | scalding/src/main/scala/sandcrawler/HBaseCountJob.scala | 3 | ||||
-rw-r--r-- | scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala | 3 | ||||
-rw-r--r-- | scalding/src/main/scala/sandcrawler/HBaseStatusCountJob.scala | 2 |
5 files changed, 23 insertions, 4 deletions
diff --git a/scalding/build.sbt b/scalding/build.sbt index f333111..cc21444 100644 --- a/scalding/build.sbt +++ b/scalding/build.sbt @@ -13,6 +13,13 @@ lazy val root = (project in file(".")). test in assembly := {}, )), + (scalastyleSources in Compile) := { + // all .scala files in "src/main/scala" + val scalaSourceFiles = ((scalaSource in Compile).value ** "*.scala").get + val dirNameToExclude = "example" + scalaSourceFiles.filterNot(_.getAbsolutePath.contains(dirNameToExclude)) + }, + name := "sandcrawler", resolvers += "conjars.org" at "http://conjars.org/repo", @@ -47,4 +54,5 @@ lazy val root = (project in file(".")). case s if s.endsWith("xml") => MergeStrategy.last case x => (assemblyMergeStrategy in assembly).value(x) }, + ) diff --git a/scalding/scalastyle-config.xml b/scalding/scalastyle-config.xml index 2f20677..e2f58a0 100644 --- a/scalding/scalastyle-config.xml +++ b/scalding/scalastyle-config.xml @@ -114,4 +114,15 @@ <check level="warning" class="org.scalastyle.scalariform.PublicMethodsHaveTypeChecker" enabled="true"></check> <check level="warning" class="org.scalastyle.file.NewLineAtEofChecker" enabled="true"></check> <check level="warning" class="org.scalastyle.file.NoNewLineAtEofChecker" enabled="false"></check> + <check class="org.scalastyle.scalariform.BlockImportChecker" level="warning" enabled="true"/> +<check class="org.scalastyle.scalariform.ImportOrderChecker" level="warning" enabled="true"> + <parameters> + <parameter name="groups">java,scala,others</parameter> + <parameter name="group.java">javax?\..+</parameter> + <parameter name="group.scala">scala\..+</parameter> + <parameter name="group.others">.+</parameter> + <parameter name="maxBlankLines">1</parameter> + <parameter name="lexicographic">true</parameter> + </parameters> + </check> </scalastyle> diff --git a/scalding/src/main/scala/sandcrawler/HBaseCountJob.scala b/scalding/src/main/scala/sandcrawler/HBaseCountJob.scala index 1ebc261..22e4e86 100644 --- a/scalding/src/main/scala/sandcrawler/HBaseCountJob.scala +++ b/scalding/src/main/scala/sandcrawler/HBaseCountJob.scala @@ -5,8 +5,9 @@ import cascading.tuple.Fields import com.twitter.scalding._ import java.util.Properties import parallelai.spyglass.base.JobBase -import parallelai.spyglass.hbase.{HBaseSource, HBasePipeConversions} import parallelai.spyglass.hbase.HBaseConstants.SourceMode +import parallelai.spyglass.hbase.HBasePipeConversions +import parallelai.spyglass.hbase.HBaseSource class HBaseCountJob(args: Args, colSpec: String) extends JobBase(args) with HBasePipeConversions { val output = args("output") diff --git a/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala b/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala index ba3b9cd..6def218 100644 --- a/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala +++ b/scalding/src/main/scala/sandcrawler/HBaseRowCountJob.scala @@ -5,8 +5,9 @@ import cascading.tuple.Fields import com.twitter.scalding._ import java.util.Properties import parallelai.spyglass.base.JobBase -import parallelai.spyglass.hbase.{HBaseSource, HBasePipeConversions} import parallelai.spyglass.hbase.HBaseConstants.SourceMode +import parallelai.spyglass.hbase.HBasePipeConversions +import parallelai.spyglass.hbase.HBaseSource class HBaseRowCountJob(args: Args) extends JobBase(args) with HBasePipeConversions { diff --git a/scalding/src/main/scala/sandcrawler/HBaseStatusCountJob.scala b/scalding/src/main/scala/sandcrawler/HBaseStatusCountJob.scala index dbd444d..b1dab0e 100644 --- a/scalding/src/main/scala/sandcrawler/HBaseStatusCountJob.scala +++ b/scalding/src/main/scala/sandcrawler/HBaseStatusCountJob.scala @@ -1,6 +1,5 @@ package sandcrawler - import com.twitter.scalding.Args import com.twitter.scalding._ import com.twitter.scalding.typed.TDsl._ @@ -9,7 +8,6 @@ import org.apache.hadoop.hbase.util.Bytes import parallelai.spyglass.base.JobBase import parallelai.spyglass.hbase.HBasePipeConversions - class HBaseStatusCountJob(args: Args) extends JobBase(args) with HBasePipeConversions { val source = HBaseCountJob.getHBaseSource(args("hbase-table"), |