Permalink
Browse files

Merge branch 'default_newrpc_and_secure' into trunk

  • Loading branch information...
2 parents e28f7d8 + 528c5cd commit 54edf4dad22b29add2a9555c9bd9f7a69cce9de2 @ekoontz committed Apr 3, 2012
View
@@ -467,6 +467,29 @@ under the License.
<scope>provided</scope>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>munge-maven-plugin</artifactId>
+ <version>${munge-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <id>munge</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>munge</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <symbols>HADOOP_OLDRPC</symbols>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</profile>
<profile>
<id>hadoop_non_secure</id>
@@ -503,7 +526,7 @@ under the License.
</execution>
</executions>
<configuration>
- <symbols>HADOOP_NON_SECURE</symbols>
+ <symbols>HADOOP_NON_SECURE,HADOOP_OLDRPC</symbols>
</configuration>
</plugin>
<plugin>
@@ -518,19 +541,6 @@ under the License.
<target>${compileSource}</target>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <systemProperties>
- <property>
- <name>prop.jarLocation</name>
- <value>target/munged/giraph-${project.version}-jar-with-dependencies.jar</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
@@ -575,9 +585,6 @@ under the License.
</goals>
</execution>
</executions>
- <configuration>
- <symbols>HADOOP_SECURE</symbols>
- </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -606,40 +613,6 @@ under the License.
<properties>
<hadoop.version>0.23.1</hadoop.version>
</properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.plugins</groupId>
- <artifactId>munge-maven-plugin</artifactId>
- <version>${munge-maven-plugin.version}</version>
- <executions>
- <execution>
- <id>munge</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>munge</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <symbols>HADOOP_SECURE</symbols>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <systemProperties>
- <property>
- <name>prop.jarLocation</name>
- <value>target/munged/giraph-${project.version}-jar-with-dependencies.jar</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
@@ -671,40 +644,6 @@ under the License.
<properties>
<hadoop.version>0.24.0-SNAPSHOT</hadoop.version>
</properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.plugins</groupId>
- <artifactId>munge-maven-plugin</artifactId>
- <version>${munge-maven-plugin.version}</version>
- <executions>
- <execution>
- <id>munge</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>munge</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <symbols>HADOOP_SECURE</symbols>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <systemProperties>
- <property>
- <name>prop.jarLocation</name>
- <value>target/munged/giraph-${project.version}-jar-with-dependencies.jar</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
@@ -52,12 +52,11 @@ public void setupJob(JobContext context) throws IOException {
public void setupTask(TaskAttemptContext context) throws IOException {
}
- /*if[HADOOP_NON_SECURE]
- @Override
- public void cleanupJob(JobContext jobContext) throws IOException {
- }
- else[HADOOP_NON_SECURE]*/
@Override
+ /*if[HADOOP_NON_SECURE]
+ public void cleanupJob(JobContext jobContext) throws IOException {
+ }
+ else[HADOOP_NON_SECURE]*/
/*end[HADOOP_NON_SECURE]*/
public void commitJob(JobContext jobContext) throws IOException {
}
@@ -61,9 +61,10 @@
import com.google.common.collect.Iterables;
-/*if[HADOOP_SECURE]
+/*if[HADOOP_OLDRPC]
+else[HADOOP_OLDRPC]*/
import org.apache.hadoop.ipc.ProtocolSignature;
-end[HADOOP_SECURE]*/
+/*end[HADOOP_OLDRPC]*/
/**
* Basic RPC communications object that implements the lower level operations
@@ -693,14 +694,24 @@ public final long getProtocolVersion(String protocol, long clientVersion)
return VERSION_ID;
}
- /*if[HADOOP_SECURE]
- public ProtocolSignature getProtocolSignature(
- String protocol,
- long clientVersion,
- int clientMethodsHash) throws IOException {
- return new ProtocolSignature(VERSION_ID, null);
- }
-end[HADOOP_SECURE]*/
+ /*if[HADOOP_OLDRPC]
+ else[HADOOP_OLDRPC]*/
+ /**
+ * Get the Protocol Signature for the given protocol,
+ * client version and method.
+ *
+ * @param protocol Protocol.
+ * @param clientVersion Version of Client.
+ * @param clientMethodsHash Hash of Client methods.
+ * @return ProtocolSignature for input parameters.
+ */
+ public ProtocolSignature getProtocolSignature(
+ String protocol,
+ long clientVersion,
+ int clientMethodsHash) throws IOException {
+ return new ProtocolSignature(VERSION_ID, null);
+ }
+ /*end[HADOOP_OLDRPC]*/
@Override
public void closeConnections() throws IOException {
Oops, something went wrong.

0 comments on commit 54edf4d

Please sign in to comment.