فهرست منبع

[hadoop] Limit job tracker thrift plugin incoming requests to 10MB

Erick Tryzelaar 10 سال پیش
والد
کامیت
e2e6cd3
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      desktop/libs/hadoop/java/src/main/java/org/apache/hadoop/thriftfs/ThriftPluginServer.java

+ 4 - 1
desktop/libs/hadoop/java/src/main/java/org/apache/hadoop/thriftfs/ThriftPluginServer.java

@@ -117,7 +117,10 @@ public class ThriftPluginServer implements Configurable, Runnable {
       server = new SanerThreadPoolServer(
         processorFactory, transport,
         transportFactory, transportFactory,
-        new TBinaryProtocol.Factory(), new TBinaryProtocol.Factory(), options);
+        // 10MB maximum request size
+        new TBinaryProtocol.Factory(true, true, 10*1024*1024),
+        new TBinaryProtocol.Factory(),
+        options);
     }
 
     Thread t = new Thread(this);