hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r582391 - in /lucene/hadoop/trunk: CHANGES.txt src/c++/pipes/impl/HadoopPipes.cc src/c++/utils/api/hadoop/SerialUtils.hh src/c++/utils/impl/SerialUtils.cc src/examples/pipes/Makefile.in
Date Fri, 05 Oct 2007 21:09:21 GMT
Author: omalley
Date: Fri Oct  5 14:09:21 2007
New Revision: 582391

URL: http://svn.apache.org/viewvc?rev=582391&view=rev
Log:
HADOOP-1983.  Make pipes flush the command socket when the application calls
progress.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/c++/pipes/impl/HadoopPipes.cc
    lucene/hadoop/trunk/src/c++/utils/api/hadoop/SerialUtils.hh
    lucene/hadoop/trunk/src/c++/utils/impl/SerialUtils.cc
    lucene/hadoop/trunk/src/examples/pipes/Makefile.in

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=582391&r1=582390&r2=582391&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Fri Oct  5 14:09:21 2007
@@ -244,6 +244,9 @@
     HADOOP-1695.  The SecondaryNamenode waits for the Primary NameNode to
     start up.  (Dhruba Borthakur)
 
+    HADOOP-1983.  Have Pipes flush the command socket when progress is sent
+    to prevent timeouts during long computations. (omalley)
+
   IMPROVEMENTS
 
     HADOOP-1908. Restructure data node code so that block sending and 

Modified: lucene/hadoop/trunk/src/c++/pipes/impl/HadoopPipes.cc
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/c%2B%2B/pipes/impl/HadoopPipes.cc?rev=582391&r1=582390&r2=582391&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/c++/pipes/impl/HadoopPipes.cc (original)
+++ lucene/hadoop/trunk/src/c++/pipes/impl/HadoopPipes.cc Fri Oct  5 14:09:21 2007
@@ -287,6 +287,7 @@
     virtual void progress(float progress) {
       serializeInt(PROGRESS, *stream);
       serializeFloat(progress, *stream);
+      stream->flush();
     }
 
     virtual void done() {
@@ -758,11 +759,11 @@
         uint64_t now = getCurrentMillis();
         if (now - lastProgress > 1000) {
           lastProgress = now;
-          uplink->progress(progressFloat);
           if (statusSet) {
             uplink->status(status);
             statusSet = false;
           }
+          uplink->progress(progressFloat);
         }
       }
     }

Modified: lucene/hadoop/trunk/src/c++/utils/api/hadoop/SerialUtils.hh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/c%2B%2B/utils/api/hadoop/SerialUtils.hh?rev=582391&r1=582390&r2=582391&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/c++/utils/api/hadoop/SerialUtils.hh (original)
+++ lucene/hadoop/trunk/src/c++/utils/api/hadoop/SerialUtils.hh Fri Oct  5 14:09:21 2007
@@ -73,6 +73,7 @@
      * @throws Error if there are problems reading
      */
     virtual void read(void *buf, size_t len) = 0;
+    virtual ~InStream() {}
   };
 
   /**
@@ -87,6 +88,11 @@
      * @throws Error if there are problems writing
      */
     virtual void write(const void *buf, size_t len) = 0;
+    /**
+     * Flush the data to the underlying store.
+     */
+    virtual void flush() = 0;
+    virtual ~OutStream() {}
   };
 
   /**
@@ -130,6 +136,7 @@
     bool open(FILE* file);
     void write(const void* buf, size_t len);
     bool advance(size_t nbytes);
+    void flush();
     bool close();
     virtual ~FileOutStream();
   private:

Modified: lucene/hadoop/trunk/src/c++/utils/impl/SerialUtils.cc
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/c%2B%2B/utils/impl/SerialUtils.cc?rev=582391&r1=582390&r2=582391&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/c++/utils/impl/SerialUtils.cc (original)
+++ lucene/hadoop/trunk/src/c++/utils/impl/SerialUtils.cc Fri Oct  5 14:09:21 2007
@@ -144,6 +144,11 @@
     return (ret == 0);
   }
 
+  void FileOutStream::flush()
+  {
+    fflush(mFile);
+  }
+
   FileOutStream::~FileOutStream()
   {
     if (mFile != NULL) {

Modified: lucene/hadoop/trunk/src/examples/pipes/Makefile.in
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/examples/pipes/Makefile.in?rev=582391&r1=582390&r2=582391&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/examples/pipes/Makefile.in (original)
+++ lucene/hadoop/trunk/src/examples/pipes/Makefile.in Fri Oct  5 14:09:21 2007
@@ -39,11 +39,10 @@
 host_triplet = @host@
 bin_PROGRAMS = wordcount-simple$(EXEEXT) wordcount-part$(EXEEXT) \
 	wordcount-nopipe$(EXEEXT)
-DIST_COMMON = config.guess config.guess config.sub config.sub \
-	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/configure $(am__configure_deps) \
-	$(top_srcdir)/impl/config.h.in depcomp depcomp ltmain.sh \
-	ltmain.sh config.guess config.guess config.sub config.sub
+DIST_COMMON = config.guess config.sub $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(top_srcdir)/configure \
+	$(am__configure_deps) $(top_srcdir)/impl/config.h.in depcomp \
+	ltmain.sh config.guess config.sub
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps =  \



Mime
View raw message