Skip to content

Commit

Permalink
Merge pull request #1578 from twitter/rubanm/deprecate_jobtest_reflec…
Browse files Browse the repository at this point in the history
…tion

Deprecate reflection-based JobTest apply method
  • Loading branch information
johnynek authored Jul 21, 2016
2 parents 868abf5 + 8ded515 commit e1833a5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ import org.apache.hadoop.mapred.JobConf
import scala.util.Try

object JobTest {

@deprecated(message = "Use the non-reflection based JobTest apply methods", since = "0.16.1")
def apply(jobName: String) = {
new JobTest((args: Args) => Job(jobName, args))
}

def apply(cons: (Args) => Job) = {
new JobTest(cons)
}

def apply[T <: Job: Manifest] = {
val cons = { (args: Args) =>
manifest[T].runtimeClass
Expand Down

0 comments on commit e1833a5

Please sign in to comment.