Best unofficial Apache Server developers community |
| |||||
| Jul 2, 2010 | |||||
|
Sharma, Avani |
|
||||
| Tags: | |||||
Similar Threads
ERROR 2998: Unhandled internal error. org/apache/hadoop/hbase/mapreduce/TableInputFormat
Hi All, This is my first mail in the apache mailing list... please bear with me as I am absolutely new to Hadoop and its family. This is my question... I have some data on my hdfs in the following form. (number:int,word:chararray, word2:chararray,somethingelse:int) I want to get this data into a neatly formed HBase Table. I chose the simpler way instead of writing my own udf. I wanted to do this.... register ../hbase/hbase-0.20.4.jar; register ../hbase/hbase-0.20.4-test.jar; A = Load '/some_data'; B = STORE A into 'hbase://something' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage; dump B; but this is the error I get when I do that 2010-07-22 16:38:35,041 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: hdfs://MyMachine01:9000 2010-07-22 16:38:35,550 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to map-reduce job tracker at: MyMachine01:9001 2010-07-22 16:38:35,868 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2998: Unhandled internal error. org/apache/hadoop/hbase/mapreduce/TableInputFormat I have checked my hbase-0.20.4.jar file and it does have a TableInputFormat class. I added the right path to hadoop-env.sh in the CLASSPATH field. I added the conf folder to the classpath and also the test jar. I don't know why it wouldn't work. My HBase installation went really smooth. I am able to check the status of the HBase in the hbase shell and still I get this error. I am totally lost at this point. I would really appreciate any help in this regard. Thanks a bunch. V.
HBase on Hadoop 0.21
Hi, I've checked the Release Notes of HDFS 0.21 and saw two fixes from hadoop- append included, other two not, but still some more that have to do with sync stuff. Is Hadoop-append for HBase made obsolete with HDFS 0.21? Thank you, Thomas Koch, http://www.koch.ro
Re: Hadoop support for hbase
Hello folks, I created a branch for doing the append/sync support for Hadoop 0.20. You can fetch the branch via http://svn.apache.org/repos/asf/hadoo...anch-0.20-append/ If you feel that there are some JIRAS that need to go into this branch, please update the fix-version of those JIRAS with the tag "0.20-append</jira/secure/IssueNavigator.jspa?reset=true&mode=hide&sorter/order=DESC&sorter/field=priority&resolution=-1&pid=12310942&fixfor=12315103> ". thanks, dhruba On Mon, May 10, 2010 at 11:35 PM, Dhruba Borthakur <dhru### @gmail.com> wrote: @Allen: we are definitely behind 0.21 release. Tom White is guiding that release and most developers are committed to removing blockers for that release. Todd rightly mentions that the work being done for 0.20 benefits 0.21 as well. @Jay: Thanks for summing it up so well. I completely agree with your viewpoint. thanks dhruba On Mon, May 10, 2010 at 2:06 PM, Jay Booth <jayb### @gmail.com> wrote: > Given that the 0.20-append branch pretty much already exists > unofficially, via IRC, IM and email forwarded patchsets, it seems like > giving it an official home is just recognizing the status quo. > Especially since 0.21 probably won't be getting rolled out into > production everywhere the first day it's officially released. If the > work's going on anyways, I don't see how giving people a shared home > hurts matters, if anything it gives them a better shared touchpoint > for forward-porting bugfixes to 0.21. > > A case could be made that by making it more painful to run > 0.20-append, more momentum is created towards 0.21 but since Tom is > already on top of 21 and seemingly doing an excellent job, and since > the HBase community will probably be some of the first people to move > to 0.21 anyways, I don't see why having 0.20-append will damage 0.21's > momentum at this point. > > > > On Mon, May 10, 2010 at 4:21 PM, Michael Segel > <michae### @hotmail.com> wrote: > > > > > > > >> From: to### @cloudera.com > >> Date: Mon, 10 May 2010 10:45:13 -0700 > >> Subject: Re: Hadoop support for hbase > >> To: gene### @hadoop.apache.org > >> > > > >> > The above is a fallacious setup. How does a branch in 0.20 detract > >> > from the 0.21 momentum (The append feature that we'd work on in 0.20 > >> > branch has little relation to how append works in 0.21). > >> > >> For what it's worth, though, the majority of the size of the 0.20 > >> append patch is made up of additional unit tests. I have started > >> forward-porting these new tests to the trunk append and it's already > >> exposed a number of bugs. So while it's tempting to say that the 0.20 > >> append is "wasted effort", it really is benefiting the entire > >> community and the 0.21 release as well. > >> > >> -Todd > >> > > > > Sometimes you have to slow down to go faster. > > > > > > > >
HBASE/HADOOP Examples
I've found examples using the older mapred interface but not the newer mapreduce interface. I want to write a mapper that is configured to only pull out specific rows(which are the mapper's keys) and a specific column's value(which is the mapper's value). Is there any examples of something like this available? James Kilbride
Re: Rolling out Hadoop/HBase updates
Hey, We're using stock CHD2 without any patches so I'm not sure if we have hdfs630 or not. For HBase we're currently on 0.20.3 and will be testing and moving to 0.20.5 soon What I did with this rollout of just config changes was take one region server down at a time and restart the datanode on the same server. So what I gather I should have done was shutdown all the region servers before restarting any of the data nodes? I guess if I split it into different parts it would be :- - HBase Rolling update for point/config releases is supported - Update masters first - Then update region servers in turn - HDFS Data nodes don't support rolling updates? (Maybe better in the hdfs list I guess) - Take down HBase - Take down datanodes - Update all the datanodes code/configs - Start datanodes - Start HBase Would you be able to let me know which of these I've got right/wrong? Thanks, On 29 June 2010 15:50, Michael Segel <michae### @hotmail.com> wrote: Dan, I don't think you can do that because your 'new/updated' node will clash with the rest of the cloud. (We're talking code and not just cloud tuning parameters.) [Read different jars...] If you're going to push an update out, then it has to be an 'all or nothing' push. Since we're using Cloudera's release, moving from CDH2 to CDH3 represents a full backup, down the cloud, remove the software completely, and then then install new CDH3. Outside of that major switch, if we were going from one sub release to another, it would be just a $> yum update hadoop-0.20 call on each node. Again, you have to take the cloud down to do that. So the bottom line... if you're going to do upgrades, you'll need to plan for some down time. HTH -Mike > From: dan.ha### @mendeley.com > Date: Tue, 29 Jun 2010 14:43:26 +0100 > Subject: Rolling out Hadoop/HBase updates > To: us### @hbase.apache.org > > Hey, > > I've been thinking about how we do out configuration and code updates for > Hadoop and HBase and was wondering what others do and what is the best > practice to avoid errors with HBase. > > Currently we do a rolling update where we restart the services on one node > at a time, so shutting down the region server then restarting the datanode > and task trackers depending on what we are updating and what has change. But > with this I have occasional found errors with the HBase cluster afterwards > due to corrupt META table which I think could have been caused by restarting > the datanode, or maybe not waiting long enough for the cluster to sort out > loosing a region server before moving on to the next. > > The most resent error upon restarting a node was :- > > 2010-06-29 10:46:44,970 ERROR > org.apache.hadoop.hbase.regionserver.HRegionServer: Error closing > files,3822b1ea8ae015f3ec932cafaa282dd211d768ad,1275145898366 > java.io.IOException: Filesystem closed > at org.apache.hadoop.hdfs.DFSClient.checkOpen(DFSClient.java:230) > > 2010-06-29 10:46:44,970 FATAL > org.apache.hadoop.hbase.regionserver.HRegionServer: Shutting down > HRegionServer: file system not available > java.io.IOException: File system is not available > at > org.apache.hadoop.hbase.util.FSUtils.checkFileSystemAvailable(FSUtils.java:129) > > > Followed by this for every region being served :- > > 2010-06-29 10:46:44,996 ERROR > org.apache.hadoop.hbase.regionserver.HRegionServer: Error closing > documents,082595c0-6d01-11df-936c-0026b95e484c,1275676410202 > java.io.IOException: Filesystem closed > at org.apache.hadoop.hdfs.DFSClient.checkOpen(DFSClient.java:230) > > > After updating all the nodes all the region server shut down after a > few minutes reporting the following :- > > 2010-06-29 11:21:59,508 WARN org.apache.hadoop.hdfs.DFSClient: Error > Recovery for block blk_-1437671530216085093_2565663 bad datanode[0] > 10.0.11.4:50010 > > 2010-06-29 11:22:09,481 FATAL org.apache.hadoop.hbase.regionserver.HLog: > Could not append. Requesting close of hlog > java.io.IOException: All datanodes 10.0.11.4:50010 are bad. Aborting... > at > org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.processDatanodeError(DFSClient.java:2542) > > > 2010-06-29 11:22:09,482 FATAL > org.apache.hadoop.hbase.regionserver.LogRoller: Log rolling failed with > ioe: > java.io.IOException: All datanodes 10.0.11.4:50010 are bad. Aborting... > at > org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.processDatanodeError(DFSClient.java:2542) > > 2010-06-29 11:22:10,344 ERROR > org.apache.hadoop.hbase.regionserver.HRegionServer: Unable to close log in > abort > java.io.IOException: All datanodes 10.0.11.4:50010 are bad. Aborting... > at > org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.processDatanodeError(DFSClient.java:2542) > > > This was fixed by restarting the master and starting the region servers > again, but it would be nice to know how to roll out changes cleaner. > > How do other people here roll out updates to HBase / Hadoop? What order do > you restart services in and how long do you wait before moving to the next > node? > > Just so you know we currently have 5 nodes and are getting another 10 to add > soon. > > Thanks, > > -- > Dan Harvey | Datamining Engineer > www.mendeley.com/profiles/dan-harvey > > Mendeley Limited | London, UK | www.mendeley.com > Registered in England and Wales | Company Number 6419015
How to specify HBase cluster end-points from HBase client code in HBase 0.20.0
Hello, In my current application environment, I need to have two HBase clusters running in two different racks, to form a fault-tolerant group to tolerate power failure. Then I have an HBase client, which is sitting outside of these two clusters, to make invocation to the these two HBase clusters. In my previous work, I just need to simply use the class of “HTable”, and passed in an instance of HBaseConfiguration. And To construct the HBaseConfiguration instance, I just need to pass in the path information of the “hbase-site.xml”. And in the hbase-site.xml, there is only one parameter called “hbase.rootdir” that need to configure. Before HBase0.20.0, there used to be a parameter called “hbase.master” that I can specify. But in HBase0.20.0, I found that it does not work any more, likely because that the HBase master is managed by the Zookeeper, and the master node now becomes dynamic. Could you show me what are the APIs that I need to use, in order for me to specify the end-point address of the HBase cluster, for the HBase client invocation? Regards, Jun
Exception in thread "main" java.lang.ClassNotFoundException in Hadoop
Hi, I have just started my career with Hadoop. I tried to execute the example given in http://hadoop.apache.org/common/docs/...d_tutorial.htmlas explained in the tutorial. I was not able to execute the program as described in the tutorial. I am getting the error as shown below. I tried executing with some other examples. They are also showing the same “ClassNotFoundException”. I tried to find the solution in various websites but i could not find it. Please help me to find the problem. Exception in thread "main" java.lang.ClassNotFoundException: org.myorg.WordCount at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
Re: svn commit: r980032 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/ main
Le 28/07/2010 14:03, er### @apache.org a écrit : Author: erans Date: Wed Jul 28 12:03:41 2010 New Revision: 980032 URL: http://svn.apache.org/viewvc?rev=980032&view=rev Log: MATH-395: Another bug uncovered; all things being equal, the code now behaves like the Puthon implementation. MATH-397: Modified "BrentOptimizer" following the changes in "AbstractUnivariateRealOptimizer". Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ConvergingAlgorithmImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/AbstractUnivariateRealOptimizer.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizerTest.java commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java [snip] */ - private double localMin(UnivariateRealFunction f, - GoalType goalType, + private double localMin(boolean isMinim, double lo, double mid, double hi, double eps, double t) Perhaps we should change this method name to localExtremum ? It seems we forgot to do that earlier despite the method was able to either minimize or maximize a function. [snip] Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizerTest.java URL: http://svn.apache.org/viewvc/commons/...032&view=diff
Is org.apache.hadoop.mapred.lib.MultipleOutputFormat deprecated?
Hi, Is org.apache.hadoop.mapred.lib.MultipleOutputFormat deprecated? I did not find @deprecated comments in source file in 0.20.2 But I cannot use following: job.setOutputFormatClass( org.apache.hadoop.mapred.lib.MultipleOutputFormat ) The type does not match.
how I can do to configure/start a hadoop cluster(pseudo distributed) with the last hadoop trunk cod
All, I have followed the instructions on http://wiki.apache.org/hadoop/EclipseEnvironment to download the latest trunk source code and build .jar for common, hdfs and mapred. but how should I proceed to configure and start a hadoop cluster(psudo distributed) with these latest .jar? I knew how to configured/start the hadoop cluster with formal hadoop package(hadoop-*.tar.gz with all stuff of common, hdfs and mapred there). I googled but didn't find the related information, most information I got after compile is to run unit test. Can anyone help? Thanks for the help. Best Regards, Fred
Commented: (PIG-1452) to remove hadoop20.jar from lib and use hadoop from the apache maven repo.
[
https://issues.apache.org/jira/browse...3#action_12893793
]
Hadoop QA commented on PIG-1452:
Updated: (PIG-1452) to remove hadoop20.jar from lib and use hadoop from the apache maven repo.
[
https://issues.apache.org/jira/browse...nels:all-tabpanel
]
Giridharan Kesavan updated PIG-1452:
Updated: (PIG-1452) to remove hadoop20.jar from lib and use hadoop from the apache maven repo.
[
https://issues.apache.org/jira/browse...nels:all-tabpanel
]
Giridharan Kesavan updated PIG-1452:
Invite a keynote talk on Hadoop in the coming Apache Aisa Roadshow in Shanghai (August 14-15)
There will be an Apache Asia Roadshow event on August 14 - 15 in Shanghai, China. As Hadoop is a very hot topic in China, we would like to invite a keynote talk on Hadoop in the event. The event could cover $2-3K travel cost for the speaker. Visit here [1] for more information on the event. If someone is interested in delivering the keynote, please drop me a note. Thanks! -Jack [1] http://www.apachecon.com/2010/Asia/cfp
Re: svn commit: r980151 - in /cxf/sandbox/logbrowser/rt/management-web/src/main: java/org/apache/cx
Hi Tomasz On Wed, Jul 28, 2010 at 7:42 PM, <tome### @apache.org> wrote: Author: tomekopo Date: Wed Jul 28 18:41:59 2010 New Revision: 980151 URL: http://svn.apache.org/viewvc?rev=980151&view=rev Log: - Fixed broken layout of 'settings' tab; - Fixed broken layout of 'authentication' tab; - Fixed moved 'last' link; - Fixed title of the page; - Add cutting long message in log entries list; If this last bit applies to a top-right pane where a list of entries is displayed then it may not be necessary. When displaying a list, you should use entry/title which is supposed to be very short but use entry/content for displaying the actual log entry content, without cutting it thanks, Sergey
Re: svn commit: r980151 - in /cxf/sandbox/logbrowser/rt/management-web/src/main: java/org/apache/cx
Hi Sergey, On Wed, Jul 28, 2010 at 10:12 PM, Sergey Beryozkin <sberyo### @gmail.com> wrote: Hi Tomasz On Wed, Jul 28, 2010 at 7:42 PM, <tome### @apache.org> wrote: > Author: tomekopo > Date: Wed Jul 28 18:41:59 2010 > New Revision: 980151 > > URL: http://svn.apache.org/viewvc?rev=980151&view=rev > Log: > - Fixed broken layout of 'settings' tab; > - Fixed broken layout of 'authentication' tab; > - Fixed moved 'last' link; > - Fixed title of the page; > - Add cutting long message in log entries list; > > If this last bit applies to a top-right pane where a list of entries is displayed then it may not be necessary. When displaying a list, you should use entry/title which is supposed to be very short but use entry/content for displaying the actual log entry content, without cutting it thanks, Sergey Thanks for you advice. I think it's better to use predefined value. I'll fix it.
Updated: (HIVE-597) jdbc/src/java/org/apache/hadoop/hive/jdbc do not have the apache header
[
https://issues.apache.org/jira/browse...nels:all-tabpanel
]
Carl Steinbach updated HIVE-597:
NoClassDefFoundError after 15 method calls
Hi, this is my first post here, I have a bug I can solve :( The context: The platform: I'm using iPOJO 1.6.2, Felix 2.0.5, Jetty 1.0.1, XMLRPC or JsonRPC The application : I have two iPOJO components (service-exporter and real-service) service-exporter requires the real-service and expose it as a Json RPC service. Its a simple application the real-service is like a "hello world"example. And I use a frontend using jscript to call the json service, and everything is OK, but only 15 calls!! I need to update the bundle to have it running again (another 15 calls) Later, I changed the JSON RPC exporter for an XMLRPC exporter to see if it was an Jabsorb problem. but it throws the exception after 15 services calls too. Someone has an idea about what its happening here? the trace exception is here: java.lang.NoClassDefFoundError: sun/reflect/MethodAccessorImpl at sun.misc.Unsafe.defineClass(Native Method) at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45) at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381) at java.security.AccessController.doPrivileged(Native Method) at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377) at sun.reflect.MethodAccessorGenerator.generateMethod(MethodAccessorGenerator.java:59) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:28) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:115) at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:106) at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:46) at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:86) at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:200) at org.apache.xmlrpc.webserver.XmlRpcServletServer.execute(XmlRpcServletServer.java:112) at org.apache.xmlrpc.webserver.XmlRpcServlet.doPost(XmlRpcServlet.java:196) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.OsgiServletHolder.handle(OsgiServletHolder.java:101) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363) at org.mortbay.jetty.servlet.OsgiServletHandler.handle(OsgiServletHandler.java:117) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522) Caused by: java.lang.ClassNotFoundException: sun.reflect.MethodAccessorImpl at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:814) at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61) at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1733) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at org.apache.felix.ipojo.handlers.dependency.Dependency$SmartProxyFactory.loadClass(Dependency.java:900) ... 33 more
Re: svn commit: r963686 - in /sling/trunk/contrib/extensions/bgservlets: ./ src/ src/main/ src/main/
This looks pretty cool. I like the idea of using the Servlet interface instead of Callable/Runnable. I have two comments: 1) The request/response pair passed to the servlet should be entirely synthetic. This is true in general AFAIK[1]; in Sling it is especially true because request.getResourceResolver() will return a closed resource resolver. 2) Even with synthetic request/response objects, I suspect that not all servlets are going to work in the background (or s/going to/should/). Thus, what about using a marker interface on the servlet to declare that it should be run in the background. Or... to declare that it can be run in the background. Justin [1] that is, the ServletRequest and ServletResponse objects are not meant to be used outside of the request thread owned by the servlet container. On 7/13/10 7:58 AM, bdelac### @apache.org wrote: Author: bdelacretaz Date: Tue Jul 13 11:58:51 2010 New Revision: 963686 URL: http://svn.apache.org/viewvc?rev=963686&view=rev Log: SLING-550 - first shot at background servlets engine, works for some simple cases, no job control yet Added: sling/trunk/contrib/extensions/bgservlets/ (with props) sling/trunk/contrib/extensions/bgservlets/pom.xml (with props) sling/trunk/contrib/extensions/bgservlets/src/ sling/trunk/contrib/extensions/bgservlets/src/main/ sling/trunk/contrib/extensions/bgservlets/src/main/java/ sling/trunk/contrib/extensions/bgservlets/src/main/java/org/ sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/ sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/ sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/ sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/ExecutionEngine.java (with props) sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/ sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/BackgroundServletStarterFilter.java (with props) sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/BackgroundTestServlet.java (with props) sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/ExecutionEngineImpl.java (with props) sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/FilterChainExecutionJob.java (with props) sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/ServletResponseWrapper.java (with props) Propchange: sling/trunk/contrib/extensions/bgservlets/
Re: svn commit: r963686 - in /sling/trunk/contrib/extensions/bgservlets: ./ src/ src/main/ src/main
Hi Justin, On Tue, Jul 13, 2010 at 3:11 PM, Justin Edelson <justin### @gmail.com> wrote: ...This looks pretty cool. I like the idea of using the Servlet interface instead of Callable/Runnable.... Yes...it came out of a brainstorm session with my colleagues, I cannot claim ownership of the idea ;-) The main thing is allowing Joe Sling Programmer to create background tasks easily. I have two comments: 1) The request/response pair passed to the servlet should be entirely synthetic. This is true in general AFAIK[1]; in Sling it is especially true because request.getResourceResolver() will return a closed resource resolver.... Yes, I already have some TODOs to look at that. It's probably not a good idea to use request/response objects outside of the current request's cycle. Right now I'm just hacking with minimal code, leaving quite a few TODOs for such things. 2) Even with synthetic request/response objects, I suspect that not all servlets are going to work in the background (or s/going to/should/). Thus, what about using a marker interface on the servlet to declare that it should be run in the background. Or... to declare that it can be run in the background... At present the class that decides to run the servlet in the background is a Filter early in the chain, so it's not aware of which servlet is used. Filtering servlets like you suggest might complicate things quite a bit, and scripts cannot easily be marked like a servlet. What would be simpler is to filter by path or path regexp, configurable in that filter...or we can just assume for now that servlets will fail loudly if unable to run in the background. Thanks for the feedback! -Bertrand
apache and vhosting
Jun 21, 2010 Apache 2.2 Tuning Jun 23, 2010 Apache 2.2 with Tomcat 6 Jun 11, 2010 Apache 2.x config help May 25, 2010 Apache optimization help Jul 20, 2010 Apache vHosts Explained May 31, 2010 Apache port numbers Jun 25, 2010 Apache Crashes after installing PHP 5.2 Jun 30, 2010 Apache reverse proxy Jul 6, 2010 Apache installation problem Jul 6, 2010 | |||||