You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ni...@apache.org on 2007/11/11 09:01:33 UTC
svn commit: r593853 - in /lucene/hadoop/branches/branch-0.14: ./
src/c++/libhdfs/ src/c++/pipes/api/hadoop/ src/c++/pipes/impl/
src/examples/pipes/impl/ src/java/org/apache/hadoop/mapred/
src/native/src/org/apache/hadoop/io/compress/lzo/ src/webapps/job/
Author: nigel
Date: Sun Nov 11 00:01:28 2007
New Revision: 593853
URL: http://svn.apache.org/viewvc?rev=593853&view=rev
Log:
Merge -r -r583423:583424 and -r593745:593747 from 0.15 branch to 0.14 branch to fix HADOOP-2001, HADOOP-2140, and HADOOP-2169
Modified:
lucene/hadoop/branches/branch-0.14/CHANGES.txt
lucene/hadoop/branches/branch-0.14/src/c++/libhdfs/Makefile
lucene/hadoop/branches/branch-0.14/src/c++/pipes/api/hadoop/Pipes.hh
lucene/hadoop/branches/branch-0.14/src/c++/pipes/api/hadoop/TemplateFactory.hh
lucene/hadoop/branches/branch-0.14/src/c++/pipes/impl/HadoopPipes.cc
lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-nopipe.cc
lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-part.cc
lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-simple.cc
lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobTracker.java
lucene/hadoop/branches/branch-0.14/src/native/src/org/apache/hadoop/io/compress/lzo/LzoCompressor.c
lucene/hadoop/branches/branch-0.14/src/native/src/org/apache/hadoop/io/compress/lzo/LzoDecompressor.c
lucene/hadoop/branches/branch-0.14/src/webapps/job/jobdetails.jsp
Modified: lucene/hadoop/branches/branch-0.14/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/CHANGES.txt?rev=593853&r1=593852&r2=593853&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/CHANGES.txt (original)
+++ lucene/hadoop/branches/branch-0.14/CHANGES.txt Sun Nov 11 00:01:28 2007
@@ -1,6 +1,22 @@
Hadoop Change Log
+Release 0.14.4 -
+
+ BUG FIXES
+
+ HADOOP-2140. Add missing Apache Licensing text at the front of several
+ C and C++ files.
+
+ HADOOP-2169. Fix the DT_SONAME field of libhdfs.so to set it to the
+ correct value of 'libhdfs.so', currently it is set to the absolute path of
+ libhdfs.so. (acmurthy)
+
+ HADOOP-2001. Make the job priority updates and job kills synchronized on
+ the JobTracker. Deadlock was seen in the JobTracker because of the lack of
+ this synchronization. (Arun C Murthy via ddas)
+
+
Release 0.14.3 - 2007-10-19
BUG FIXES
Modified: lucene/hadoop/branches/branch-0.14/src/c++/libhdfs/Makefile
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/c%2B%2B/libhdfs/Makefile?rev=593853&r1=593852&r2=593853&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/c++/libhdfs/Makefile (original)
+++ lucene/hadoop/branches/branch-0.14/src/c++/libhdfs/Makefile Sun Nov 11 00:01:28 2007
@@ -31,8 +31,9 @@
CPPFLAGS = -m32 -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(PLATFORM)
LIB_NAME = hdfs
-SO_TARGET = $(LIBHDFS_BUILD_DIR)/lib$(LIB_NAME).so.$(SHLIB_VERSION)
-SO = $(LIBHDFS_BUILD_DIR)/lib$(LIB_NAME).so
+SO_NAME = lib$(LIB_NAME).so
+SO_TARGET = $(LIBHDFS_BUILD_DIR)/$(SO_NAME).$(SHLIB_VERSION)
+SO = $(LIBHDFS_BUILD_DIR)/$(SO_NAME)
RM = rm -rf
LINK = ln -sf
@@ -52,7 +53,7 @@
all: $(SO_TARGET) $(HDFS_TEST) $(HDFS_READ_TEST) $(HDFS_WRITE_TEST)
$(SO_TARGET): $(COBJS)
- $(LD) $(LDFLAGS) -o $(SO_TARGET) -Wl,-soname,$(SO_TARGET) $(COBJS) \
+ $(LD) $(LDFLAGS) -o $(SO_TARGET) -Wl,-soname,$(SO_NAME) $(COBJS) \
&& $(LINK) $(SO_TARGET) $(SO)
$(LIBHDFS_BUILD_DIR)/%.o: %.c
Modified: lucene/hadoop/branches/branch-0.14/src/c++/pipes/api/hadoop/Pipes.hh
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/c%2B%2B/pipes/api/hadoop/Pipes.hh?rev=593853&r1=593852&r2=593853&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/c++/pipes/api/hadoop/Pipes.hh (original)
+++ lucene/hadoop/branches/branch-0.14/src/c++/pipes/api/hadoop/Pipes.hh Sun Nov 11 00:01:28 2007
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#ifndef HADOOP_PIPES_HH
#define HADOOP_PIPES_HH
Modified: lucene/hadoop/branches/branch-0.14/src/c++/pipes/api/hadoop/TemplateFactory.hh
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/c%2B%2B/pipes/api/hadoop/TemplateFactory.hh?rev=593853&r1=593852&r2=593853&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/c++/pipes/api/hadoop/TemplateFactory.hh (original)
+++ lucene/hadoop/branches/branch-0.14/src/c++/pipes/api/hadoop/TemplateFactory.hh Sun Nov 11 00:01:28 2007
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#ifndef HADOOP_PIPES_TEMPLATE_FACTORY_HH
#define HADOOP_PIPES_TEMPLATE_FACTORY_HH
Modified: lucene/hadoop/branches/branch-0.14/src/c++/pipes/impl/HadoopPipes.cc
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/c%2B%2B/pipes/impl/HadoopPipes.cc?rev=593853&r1=593852&r2=593853&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/c++/pipes/impl/HadoopPipes.cc (original)
+++ lucene/hadoop/branches/branch-0.14/src/c++/pipes/impl/HadoopPipes.cc Sun Nov 11 00:01:28 2007
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "hadoop/Pipes.hh"
#include "hadoop/SerialUtils.hh"
#include "hadoop/StringUtils.hh"
Modified: lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-nopipe.cc
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-nopipe.cc?rev=593853&r1=593852&r2=593853&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-nopipe.cc (original)
+++ lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-nopipe.cc Sun Nov 11 00:01:28 2007
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#include "hadoop/Pipes.hh"
#include "hadoop/TemplateFactory.hh"
#include "hadoop/StringUtils.hh"
Modified: lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-part.cc
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-part.cc?rev=593853&r1=593852&r2=593853&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-part.cc (original)
+++ lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-part.cc Sun Nov 11 00:01:28 2007
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "hadoop/Pipes.hh"
#include "hadoop/TemplateFactory.hh"
#include "hadoop/StringUtils.hh"
Modified: lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-simple.cc
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-simple.cc?rev=593853&r1=593852&r2=593853&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-simple.cc (original)
+++ lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-simple.cc Sun Nov 11 00:01:28 2007
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "hadoop/Pipes.hh"
#include "hadoop/TemplateFactory.hh"
#include "hadoop/StringUtils.hh"
Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobTracker.java?rev=593853&r1=593852&r2=593853&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobTracker.java (original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/JobTracker.java Sun Nov 11 00:01:28 2007
@@ -1495,7 +1495,7 @@
/**
* Sort jobs by priority and then by start time.
*/
- public void resortPriority() {
+ private synchronized void resortPriority() {
Comparator<JobInProgress> comp = new Comparator<JobInProgress>() {
public int compare(JobInProgress o1, JobInProgress o2) {
int res = o1.getPriority().compareTo(o2.getPriority());
@@ -1696,6 +1696,23 @@
return jobs.get(jobid);
}
+ /**
+ * Change the run-time priority of the given job.
+ * @param jobId job id
+ * @param priority new {@link JobPriority} for the job
+ */
+ synchronized void setJobPriority(String jobId, JobPriority priority) {
+ JobInProgress job = jobs.get(jobId);
+ if (job != null) {
+ job.setPriority(priority);
+
+ // Re-sort jobs to reflect this change
+ resortPriority();
+ } else {
+ LOG.warn("Trying to change the priority of an unknown job: " + jobId);
+ }
+ }
+
////////////////////////////////////////////////////
// Methods to track all the TaskTrackers
////////////////////////////////////////////////////
Modified: lucene/hadoop/branches/branch-0.14/src/native/src/org/apache/hadoop/io/compress/lzo/LzoCompressor.c
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/native/src/org/apache/hadoop/io/compress/lzo/LzoCompressor.c?rev=593853&r1=593852&r2=593853&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/native/src/org/apache/hadoop/io/compress/lzo/LzoCompressor.c (original)
+++ lucene/hadoop/branches/branch-0.14/src/native/src/org/apache/hadoop/io/compress/lzo/LzoCompressor.c Sun Nov 11 00:01:28 2007
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#if defined HAVE_CONFIG_H
#include <config.h>
#endif
Modified: lucene/hadoop/branches/branch-0.14/src/native/src/org/apache/hadoop/io/compress/lzo/LzoDecompressor.c
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/native/src/org/apache/hadoop/io/compress/lzo/LzoDecompressor.c?rev=593853&r1=593852&r2=593853&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/native/src/org/apache/hadoop/io/compress/lzo/LzoDecompressor.c (original)
+++ lucene/hadoop/branches/branch-0.14/src/native/src/org/apache/hadoop/io/compress/lzo/LzoDecompressor.c Sun Nov 11 00:01:28 2007
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#if defined HAVE_CONFIG_H
#include <config.h>
#endif
Modified: lucene/hadoop/branches/branch-0.14/src/webapps/job/jobdetails.jsp
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/webapps/job/jobdetails.jsp?rev=593853&r1=593852&r2=593853&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/webapps/job/jobdetails.jsp (original)
+++ lucene/hadoop/branches/branch-0.14/src/webapps/job/jobdetails.jsp Sun Nov 11 00:01:28 2007
@@ -104,8 +104,8 @@
String action = request.getParameter("action");
if("changeprio".equalsIgnoreCase(action)) {
- job.setPriority(JobPriority.valueOf(request.getParameter("prio")));
- tracker.resortPriority();
+ tracker.setJobPriority(jobId,
+ JobPriority.valueOf(request.getParameter("prio")));
}
if(JspHelper.conf.getBoolean(PRIVATE_ACTIONS_KEY, false)) {
@@ -114,8 +114,8 @@
printConfirm(out, jobId);
return;
}
- else if(action != null && action.equalsIgnoreCase("kill")) {
- job.kill();
+ else if(action != null && action.equalsIgnoreCase("kill")) {
+ tracker.killJob(jobId);
}
}
%>