Permalink
Browse files

Prepare to rewrite wrappers as swig implementations

  • Loading branch information...
1 parent cce51b1 commit f8c0a75f54dc1f0e9824ba979518c6f4ad4d283b @MarkDelany MarkDelany committed Oct 22, 2011
Showing with 777 additions and 3,755 deletions.
  1. +14 −2 Makefile.am
  2. +4 −1 clientServiceLibrary/Makefile.am
  3. +0 −82 clientServiceLibrary/faultEnglish.cc.txt
  4. +0 −657 commands/Makefile
  5. +0 −493 commonLibrary/Makefile
  6. +245 −4 configure
  7. +46 −4 configure.ac
  8. +0 −559 manager/Makefile
  9. +0 −481 replace/Makefile
  10. +0 −481 replace/Makefile.in
  11. +0 −626 services/Makefile
  12. +0 −365 testPrograms/Makefile
  13. +7 −0 wrappers/java.old/Makefile.Yahoo
  14. +2 −0 wrappers/java.old/README
  15. 0 wrappers/{java → java.old}/com/yahoo/pluton/Client.java
  16. 0 wrappers/{java → java.old}/com/yahoo/pluton/ClientRequest.java
  17. 0 wrappers/{java → java.old}/com/yahoo/pluton/Service.java
  18. +16 −0 wrappers/java.old/jar/Makefile.Yahoo
  19. +43 −0 wrappers/java.old/jni/Makefile.Yahoo
  20. 0 wrappers/{java → java.old}/jni/client.c
  21. 0 wrappers/{java → java.old}/jni/generate_FaultExceptions.pl
  22. 0 wrappers/{java → java.old}/jni/initThreads.cc
  23. 0 wrappers/{java → java.old}/jni/service.c
  24. +202 −0 wrappers/java.old/pluton.c
  25. +15 −0 wrappers/java/Makefile.am
  26. +53 −0 wrappers/perl.old/Makefile.Yahoo
  27. 0 wrappers/{php/unit_tests/84-service-getstuff.1.data → perl.old/Makefile.am}
  28. +6 −0 wrappers/perl.old/README
  29. 0 wrappers/{perl → perl.old}/pluton.i
  30. 0 wrappers/{perl → perl.old}/swigClient.cc
  31. 0 wrappers/{perl → perl.old}/swigClient.h
  32. 0 wrappers/{perl → perl.old}/swigService.cc
  33. 0 wrappers/{perl → perl.old}/swigService.h
  34. +34 −0 wrappers/perl.old/tc.pl
  35. +35 −0 wrappers/perl.old/ts.pl
  36. +17 −0 wrappers/perl/Makefile.am
  37. +9 −0 wrappers/php.old/Makefile.Yahoo
  38. 0 wrappers/{php/unit_tests/86-service-context.1.data → php.old/Makefile.am}
  39. +1 −0 wrappers/php.old/README
  40. 0 wrappers/{php → php.old}/php_pluton.h
  41. 0 wrappers/{php → php.old}/php_pluton_structures.h
  42. 0 wrappers/{php → php.old}/pluton.cc
  43. 0 wrappers/{php → php.old}/unit_tests/05-client-simple.expected.stdout
  44. 0 wrappers/{php → php.old}/unit_tests/05-client-simple.php
  45. 0 wrappers/{php → php.old}/unit_tests/10-client-fault.expected.stdout
  46. 0 wrappers/{php → php.old}/unit_tests/10-client-fault.php
  47. 0 wrappers/{php → php.old}/unit_tests/12-client-timeout.expected.stdout
  48. 0 wrappers/{php → php.old}/unit_tests/12-client-timeout.php
  49. 0 wrappers/{php → php.old}/unit_tests/15-client-execute.expected.stdout
  50. 0 wrappers/{php → php.old}/unit_tests/15-client-execute.php
  51. 0 wrappers/{php → php.old}/unit_tests/50-clientrequest-attributes.php
  52. 0 wrappers/{php → php.old}/unit_tests/55-clientrequest-context.php
  53. 0 wrappers/{php → php.old}/unit_tests/60-clientrequest-inprogress.php
  54. 0 wrappers/{php → php.old}/unit_tests/65-clientrequest-fault.php
  55. 0 wrappers/{php → php.old}/unit_tests/71-client-leak.expected.stdout
  56. 0 wrappers/{php → php.old}/unit_tests/71-client-leak.php
  57. 0 wrappers/{php → php.old}/unit_tests/72-clientrequest-leak.php
  58. 0 wrappers/{php → php.old}/unit_tests/80-service-simple.1.data
  59. 0 wrappers/{php → php.old}/unit_tests/80-service-simple.1.expected.dataout
  60. 0 wrappers/{php → php.old}/unit_tests/80-service-simple.php
  61. 0 wrappers/{php → php.old}/unit_tests/82-service-sendfault.1.data
  62. 0 wrappers/{php → php.old}/unit_tests/82-service-sendfault.1.expected.stderr
  63. 0 wrappers/{php → php.old}/unit_tests/82-service-sendfault.php
  64. 0 wrappers/php.old/unit_tests/84-service-getstuff.1.data
  65. 0 wrappers/{php → php.old}/unit_tests/84-service-getstuff.1.expected.dataout
  66. 0 wrappers/{php → php.old}/unit_tests/84-service-getstuff.php
  67. 0 wrappers/{php → php.old}/unit_tests/86-service-context.1.context
  68. 0 wrappers/php.old/unit_tests/86-service-context.1.data
  69. 0 wrappers/{php → php.old}/unit_tests/86-service-context.1.expected.dataout
  70. 0 wrappers/{php → php.old}/unit_tests/86-service-context.php
  71. 0 wrappers/{php → php.old}/unit_tests/90-service-getfault.1.php
  72. 0 wrappers/{php → php.old}/unit_tests/90-service-getfault.php
  73. 0 wrappers/{php → php.old}/unit_tests/91-service-leak.php
  74. 0 wrappers/{php → php.old}/unit_tests/95-other-leak1.sh
  75. 0 wrappers/{php → php.old}/unit_tests/run_client_tests.sh
  76. 0 wrappers/{php → php.old}/unit_tests/run_other_tests.sh
  77. 0 wrappers/{php → php.old}/unit_tests/run_service_tests.sh
  78. 0 wrappers/{php → php.old}/unit_tests/runall.sh
  79. +1 −0 wrappers/php.old/yahoo_pluton.ini
  80. +19 −0 wrappers/php/Makefile.am
  81. +8 −0 wrappers/pluton.i
View
@@ -1,5 +1,17 @@
-SUBDIRS = commonLibrary clientServiceLibrary manager commands services \
- testPrograms wrappers/perl wrappers/java wrappers/php
+if BUILDPHPWRAPPER
+ PHPWRAPPER = wrappers/php
+endif
+if BUILDPERLWRAPPER
+ PERLWRAPPER = wrappers/perl
+endif
+if BUILDJAVAWRAPPER
+ JAVAWRAPPER = wrappers/java
+endif
+
+
+SUBDIRS = commonLibrary clientServiceLibrary manager commands services testPrograms \
+ $(PHPWRAPPER) $(PERLWRAPPER) $(JAVAWRAPPER)
+
ACLOCAL_AMFLAGS = -I m4
include_HEADERS = include/pluton/client.h include/pluton/clientEvent.h \
@@ -12,6 +12,9 @@ libpluton_la_LIBADD = $(top_builddir)/commonLibrary/libcommon.a
libpluton_la_LDFLAGS = -version-info 0:0:0
faultEnglish.cc.txt: $(top_srcdir)/include/pluton/fault.h
- $(SHELL) ./generate_FaultEnglish.sh <faultEnglish.cc.txt >$@
+ $(SHELL) ./generate_FaultEnglish.sh <$? >$@
faultImpl.lo: faultEnglish.cc.txt
+
+clean-local:
+ -rm -f faultEnglish.cc.txt
@@ -1,82 +0,0 @@
-
-//////////////////////////////////////////////////////////////////////
-// DO NOT EDIT
-// This code is auto-generated by generate_FaultEnglish.sh
-// DO NOT EDIT
-//////////////////////////////////////////////////////////////////////
-
-static const char*
-faultCodeToEnglish(pluton::faultCode fc)
-{
- switch(fc) {
- case pluton::deserializeFailed : return "deserializeFailed:De-serialization of netString packet failed";
- case pluton::unknownFunction : return "unknownFunction:Service wildcard request with invalid function";
- case pluton::requestTooLarge : return "requestTooLarge:Request too large";
- case pluton::remoteConnectFailed : return "remoteConnectFailed:Could not connect to remote host";
- case pluton::remoteTransferFailed : return "remoteTransferFailed:Write to remote socket failed mid-stream";
- case pluton::lastReservedUserFault : return "lastReservedUserFault:If you see this - worry!";
- case pluton::alreadyInitialized : return "alreadyInitialized:Multiple calls to ::initialize()";
- case pluton::notInitialized : return "notInitialized:Must call ::initialize() prior to all others";
- case pluton::requestNotAdded : return "requestNotAdded:Waiting on a request that is not in progress";
- case pluton::requestAlreadyAdded : return "requestAlreadyAdded:Request has already been added";
- case pluton::requestInProgress : return "requestInProgress:Request is still being sent to the service";
- case pluton::responseInProgress : return "responseInProgress:Response has not yet been read from service";
- case pluton::unimplemented : return "unimplemented:Called an unimplemented method";
- case pluton::badRequestLength : return "badRequestLength:Request Length is less than zero";
- case pluton::noAffinity : return "noAffinity:needAffinityAttr set on non-connected request";
- case pluton::noWaitNotAllowed : return "noWaitNotAllowed:Cannot have noWaitAttr and keepAffinityAttr";
- case pluton::needNoRetry : return "needNoRetry:Must have noRetryAttr with keepAffinityAttr";
- case pluton::openSocketFailed : return "openSocketFailed:-1 return from socket()";
- case pluton::connectFailed : return "connectFailed:-1 return from connect()";
- case pluton::socketWriteFailed : return "socketWriteFailed:-1 return from socket write()";
- case pluton::socketReadFailed : return "socketReadFailed:-1 return from socket read()";
- case pluton::serviceTimeout : return "serviceTimeout:Caller timeout expired";
- case pluton::incompleteResponse : return "incompleteResponse:Service closed socket with response pending";
- case pluton::responsePacketFormatError : return "responsePacketFormatError:Response Packet format is invalid";
- case pluton::contextFormatError : return "contextFormatError:Context data in packet is incorrect";
- case pluton::contextReservedNamespace : return "contextReservedNamespace:Context key cannot start with .pluton";
- case pluton::setsockoptFailed : return "setsockoptFailed:-1 return from setsockopt()";
- case pluton::fcntlFailed : return "fcntlFailed:-1 return from fcntl()";
- case pluton::serviceNotFound : return "serviceNotFound:ServiceKey is not in lookupMap";
- case pluton::serviceKeyBad : return "serviceKeyBad:Format of serviceKey is invalid";
- case pluton::mapInitializationFailed : return "mapInitializationFailed:Could not open/mmap the lookup map";
- case pluton::openForMmapFailed : return "openForMmapFailed:open() prior to mmap() of lookup Path failed";
- case pluton::lookupButNoMap : return "lookupButNoMap:Attempted lookup on non-mapped lookup Path";
- case pluton::persistentRemapFlag : return "persistentRemapFlag:Remap flag set after remap attempt";
- case pluton::exceededRetryLimit : return "exceededRetryLimit:Configured retry limit has been exceeded";
- case pluton::retryNotAllowed : return "retryNotAllowed:noRetryAttr set on a request that failed";
- case pluton::remoteNotAllowed : return "remoteNotAllowed:noRemoteAttr set on a request to be relayed";
- case pluton::writeEventForWrongFD : return "writeEventForWrongFD:pluton::clientImpl::sendCanWriteEvent gave a bad fd";
- case pluton::readEventForWrongFD : return "readEventForWrongFD:pluton::clientImpl::sendCanReadEvent gave a bad fd";
- case pluton::writeEventWrongState : return "writeEventWrongState:pluton::clientImpl::writeEvent with wrong state";
- case pluton::readEventWrongState : return "readEventWrongState:pluton::clientImpl::readEvent with wrong state";
- case pluton::openAcceptSocketFailed : return "openAcceptSocketFailed:Could not open getenv('plutonAcceptSocket')";
- case pluton::mmapInheritedShmFDFailed : return "mmapInheritedShmFDFailed:Could not mmap fd passed by manager";
- case pluton::getRequestNotNext : return "getRequestNotNext:Out of sequence call to getRequest()";
- case pluton::acceptFailed : return "acceptFailed:accept() on listening socket failed";
- case pluton::noFauxSTDIN : return "noFauxSTDIN:Service needs a faux STDIN when run from the shell";
- case pluton::wrongNSType : return "wrongNSType:Unexpected netString type";
- case pluton::requestDecodeFailed : return "requestDecodeFailed:Could not decode request packet";
- case pluton::requestNetStringParseError : return "requestNetStringParseError:Parse of request packet netstring failed";
- case pluton::sendResponseNotNext : return "sendResponseNotNext:Out of sequence call to sendResponse()";
- case pluton::sendRawResponseNotNext : return "sendRawResponseNotNext:Out of sequence call to sendRawResponse()";
- case pluton::netStringTooLarge : return "netStringTooLarge:buffer cannot expand to fit inbound netString";
- case pluton::unexpectedEOF : return "unexpectedEOF:EOF mid-way through a packet read";
- case pluton::bindFailed : return "bindFailed:-1 return from bind()";
- case pluton::unlinkFailed : return "unlinkFailed:-1 return from unlink() of named pipe";
- case pluton::listenFailed : return "listenFailed:-1 returned from listen()";
- case pluton::emptyIdentifier : return "emptyIdentifier:Empty parameters given to openService()";
- case pluton::pollInterrupted : return "pollInterrupted:-1 and EINTR returned from poll() of pipe";
- case pluton::shmFstatFailed : return "shmFstatFailed:fstat() return -1 on mmap fd";
- case pluton::shmMmapFailed : return "shmMmapFailed:mmap() returned MAP_FAILED";
- case pluton::shmVersionMisMatch : return "shmVersionMisMatch:shm verion differs from expected";
- case pluton::shmThreadConfigNotService : return "shmThreadConfigNotService:Threaded Config mis-matches service";
- case pluton::shmThreadServiceNotConfig : return "shmThreadServiceNotConfig:Threaded Service mis-matches config";
- case pluton::shmPreWriteFailed : return "shmPreWriteFailed:Pre-write of mmap file failed";
- case pluton::shmImpossiblySmall : return "shmImpossiblySmall:Lookup Map file too small to be valid";
- case pluton::seriousInternalOSError : return "seriousInternalOSError:syscall failure";
- case pluton::seriousInternalRoutingError : return "seriousInternalRoutingError:Response returned to wrong client";
- default: break;
- }
- return "Unknown faultCode?";
-}
Oops, something went wrong.

0 comments on commit f8c0a75

Please sign in to comment.