Skip to content

Commit 8129bb6

Browse files
committed
Revert "Removed chill-storm"
This reverts commit 5c8310d.
1 parent 0a6dda1 commit 8129bb6

File tree

2 files changed

+60
-1
lines changed

2 files changed

+60
-1
lines changed

build.sbt

+12-1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ lazy val chillAll = Project(
105105
chill,
106106
chillBijection,
107107
chillScrooge,
108+
chillStorm,
108109
chillJava,
109110
chillHadoop,
110111
chillThrift,
@@ -126,7 +127,7 @@ lazy val noPublishSettings = Seq(
126127
* This returns the youngest jar we released that is compatible with the current.
127128
*/
128129
val unreleasedModules = Set[String]("akka")
129-
val javaOnly = Set[String]("java", "hadoop", "thrift", "protobuf")
130+
val javaOnly = Set[String]("storm", "java", "hadoop", "thrift", "protobuf")
130131
val binaryCompatVersion = "0.9.2"
131132

132133
def youngestForwardCompatible(subProj: String) =
@@ -143,6 +144,7 @@ val ignoredABIProblems = {
143144
import com.typesafe.tools.mima.core._
144145
import com.typesafe.tools.mima.core.ProblemFilters._
145146
Seq(
147+
exclude[MissingTypesProblem]("com.twitter.chill.storm.BlizzardKryoFactory"),
146148
exclude[MissingTypesProblem]("com.twitter.chill.InnerClosureFinder"),
147149
exclude[IncompatibleResultTypeProblem]("com.twitter.chill.InnerClosureFinder.visitMethod"),
148150
exclude[IncompatibleResultTypeProblem]("com.twitter.chill.FieldAccessFinder.visitMethod"),
@@ -214,6 +216,15 @@ lazy val chillJava = module("java").settings(
214216
autoScalaLibrary := false
215217
)
216218

219+
// This can only have java deps!
220+
lazy val chillStorm = module("storm")
221+
.settings(
222+
crossPaths := false,
223+
autoScalaLibrary := false,
224+
libraryDependencies += "org.apache.storm" % "storm-core" % "2.4.0" % "provided"
225+
)
226+
.dependsOn(chillJava)
227+
217228
// This can only have java deps!
218229
lazy val chillHadoop = module("hadoop")
219230
.settings(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
Copyright 2012 Twitter, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package com.twitter.chill.storm;
18+
19+
import org.apache.storm.serialization.IKryoFactory;
20+
import com.esotericsoftware.kryo.kryo5.Kryo;
21+
import java.util.Map;
22+
23+
import com.twitter.chill.KryoInstantiator;
24+
import com.twitter.chill.config.JavaMapConfig;
25+
import com.twitter.chill.config.ConfiguredInstantiator;
26+
import com.twitter.chill.config.ConfigurationException;
27+
28+
/** BlizzardKryoFactory. get it? chilly storm.
29+
* This is a thin wrapper for using the ConfiguredInstantiator. It
30+
* creates the entire kryo object in the getKryo method and then
31+
* doesn't do anything else.
32+
*
33+
* To set this up, you probably want to use ConfiguredInstantitator with
34+
* the JavaMapConfig.
35+
*/
36+
public class BlizzardKryoFactory implements IKryoFactory {
37+
public Kryo getKryo(Map conf) {
38+
KryoInstantiator kryoInst;
39+
try {
40+
kryoInst = new ConfiguredInstantiator(new JavaMapConfig(conf));
41+
return kryoInst.newKryo();
42+
}
43+
catch(ConfigurationException cx) { throw new RuntimeException(cx); }
44+
}
45+
public void preRegister(Kryo k, Map conf) { }
46+
public void postRegister(Kryo k, Map conf) { }
47+
public void postDecorate(Kryo k, Map conf) { }
48+
}

0 commit comments

Comments
 (0)