List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:November 17 2007 9:15pm
Subject:Rev 261: Finished adding all MGM LogEvent classes. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel

------------------------------------------------------------
revno: 261
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: devel
timestamp: Sat 2007-11-17 13:15:41 -0800
message:
  Finished adding all MGM LogEvent classes. 
modified:
  interface/mgmapi/NdbLogEvent.i ndblogevent.i-20070906065931-8drgzkovsy4cdn0b-1
  java/Makefile.am               makefile.am-20070415032352-9dpe6aurqcnuwcrd-1
=== modified file 'interface/mgmapi/NdbLogEvent.i'
--- a/interface/mgmapi/NdbLogEvent.i	2007-11-17 20:11:59 +0000
+++ b/interface/mgmapi/NdbLogEvent.i	2007-11-17 21:15:41 +0000
@@ -26,28 +26,28 @@
 
 class ndb_logevent { 
 
-    /** NdbLogEventHandle (to be used for comparing only)
-     *  set in ndb_logevent_get_next()
-     */ 
-    void *handle;
-
-    /** Which event */
-    enum Ndb_logevent_type type;
-
-    /** Time when log event was registred at the management server */
-    unsigned time;
-
-    /** Category of log event */
-    enum ndb_mgm_event_category category;
-
-    /** Severity of log event */
-    enum ndb_mgm_event_severity severity;
-
-    /** Level (0-15) of log event */
-    unsigned level;
-
-    /** Node ID of the node that reported the log event */
-    unsigned source_nodeid;
+  /** NdbLogEventHandle (to be used for comparing only)
+   *  set in ndb_logevent_get_next()
+   */ 
+  void *handle;
+
+  /** Which event */
+  enum Ndb_logevent_type type;
+
+  /** Time when log event was registred at the management server */
+  unsigned time;
+
+  /** Category of log event */
+  enum ndb_mgm_event_category category;
+
+  /** Severity of log event */
+  enum ndb_mgm_event_severity severity;
+
+  /** Level (0-15) of log event */
+  unsigned level;
+
+  /** Node ID of the node that reported the log event */
+  unsigned source_nodeid;
 
 };
 
@@ -375,37 +375,48 @@
 
   class StartLogEvent : public BaseEvent { 
   public:
-     	unsigned logPart;
-	unsigned startMb;
-	unsigned stopMb;
-	unsigned gci;
+    unsigned logPart;
+    unsigned startMb;
+    unsigned stopMb;
+    unsigned gci;
 
     StartLogEvent(ndb_logevent theEvent) {
       event=theEvent;
 
-     logPart=event.StartLog.log_part;
-     startMb=event.StartLog.start_mb;
-     stopMb=event.StartLog.stop_mb;
-     gci=event.StartLog.gci;
+      logPart=event.StartLog.log_part;
+      startMb=event.StartLog.start_mb;
+      stopMb=event.StartLog.stop_mb;
+      gci=event.StartLog.gci;
     }
   };
 
   class UNDORecordsExecutedEvent : public BaseEvent { 
   public:
+    unsigned block;
+    unsigned data1;
+    unsigned data2;
+    unsigned data3;
+    unsigned data4;
+    unsigned data5;
+    unsigned data6;
+    unsigned data7;
+    unsigned data8;
+    unsigned data9;
+    unsigned data10;
     UNDORecordsExecutedEvent(ndb_logevent theEvent) {
       event=theEvent;
+      block=event.UNDORecordsExecuted.block;
+      data1=event.UNDORecordsExecuted.data1;
+      data2=event.UNDORecordsExecuted.data2;
+      data3=event.UNDORecordsExecuted.data3;
+      data4=event.UNDORecordsExecuted.data4;
+      data5=event.UNDORecordsExecuted.data5;
+      data6=event.UNDORecordsExecuted.data6;
+      data7=event.UNDORecordsExecuted.data7;
+      data8=event.UNDORecordsExecuted.data8;
+      data9=event.UNDORecordsExecuted.data9;
+      data10=event.UNDORecordsExecuted.data10;
     }
-     	unsigned block;
-	unsigned data1;
-	unsigned data2;
-	unsigned data3;
-	unsigned data4;
-	unsigned data5;
-	unsigned data6;
-	unsigned data7;
-	unsigned data8;
-	unsigned data9;
-	unsigned data10;
   };
 
   class NRCopyDictEvent : public BaseEvent { 
@@ -424,71 +435,102 @@
 
   class NRCopyFragsStartedEvent : public BaseEvent { 
   public:
+    unsigned destNode;
+
     NRCopyFragsStartedEvent(ndb_logevent theEvent) {
       event=theEvent;
+      destNode=event.NR_CopyFragsStarted.dest_node;
     }
-     	unsigned dest_node;
+
+
   };
 
   class NRCopyFragDoneEvent : public BaseEvent { 
   public:
+
+    unsigned destNode;
+    unsigned tableId;
+    unsigned fragmentId;
+
     NRCopyFragDoneEvent(ndb_logevent theEvent) {
       event=theEvent;
+      destNode=event.NR_CopyFragDone.dest_node;
+      tableId=event.NR_CopyFragDone.table_id;
+      fragmentId=event.NR_CopyFragDone.fragment_id;
     }
-     	unsigned dest_node;
-	unsigned table_id;
-	unsigned fragment_id;
+
+
   };
 
   class NRCopyFragsCompletedEvent : public BaseEvent { 
   public:
+    unsigned destNode;
     NRCopyFragsCompletedEvent(ndb_logevent theEvent) {
       event=theEvent;
+      destNode=event.NR_CopyFragsCompleted.dest_node;
     }
-     	unsigned dest_node;
+
   };
 
   class NodeFailCompletedEvent : public BaseEvent { 
   public:
+    unsigned block; /* 0 = all */
+    unsigned failedNode;
+    unsigned completingNode; /* 0 = all */
     NodeFailCompletedEvent(ndb_logevent theEvent) {
       event=theEvent;
+      block=event.NodeFailCompleted.block;
+      failedNode=event.NodeFailCompleted.failed_node;
+      completingNode=event.NodeFailCompleted.completing_node; 
     }
-     	unsigned block; /* 0 = all */
-	unsigned failed_node;
-	unsigned completing_node; /* 0 = all */
+
   };
 
   class NodeFAILREPEvent : public BaseEvent { 
   public:
+    unsigned failedNode;
+    unsigned failureState;
     NodeFAILREPEvent(ndb_logevent theEvent) {
       event=theEvent;
+      failedNode=event.NODE_FAILREP.failed_node;
+      failureState=event.NODE_FAILREP.failure_state;
     }
-     	unsigned failed_node;
-	unsigned failure_state;
+
   };
 
   class ArbitStateEvent : public BaseEvent { 
   public:
+
+    unsigned code;                /* code & state << 16 */
+    unsigned arbitNode;
+    unsigned ticket0;
+    unsigned ticket1;
+    /* TODO */
     ArbitStateEvent(ndb_logevent theEvent) {
       event=theEvent;
+      code=event.ArbitState.code;
+      arbitNode=event.ArbitState.arbit_node;
+      ticket0=event.ArbitState.ticket_0;
+      ticket1=event.ArbitState.ticket_1;
     }
-     	unsigned code;                /* code & state << 16 */
-	unsigned arbit_node;
-	unsigned ticket_0;
-	unsigned ticket_1;
-	/* TODO */
+
   };
 
   class ArbitResultEvent : public BaseEvent { 
   public:
+
+    unsigned code;                /* code & state << 16 */
+    unsigned arbitNode;
+    unsigned ticket0;
+    unsigned ticket1;
     ArbitResultEvent(ndb_logevent theEvent) {
       event=theEvent;
+      code=event.ArbitResult.code; 
+      arbitNode=event.ArbitResult.arbit_node;
+      ticket0=event.ArbitResult.ticket_0;
+      ticket1=event.ArbitResult.ticket_1;
     }
-     	unsigned code;                /* code & state << 16 */
-	unsigned arbit_node;
-	unsigned ticket_0;
-	unsigned ticket_1;
-	/* TODO */
+
   };
 
   class GCPTakeoverStartedEvent : public BaseEvent { 
@@ -514,116 +556,190 @@
 
   class LCPTakeoverCompletedEvent : public BaseEvent { 
   public:
+    unsigned state;
     LCPTakeoverCompletedEvent(ndb_logevent theEvent) {
       event=theEvent;
+      state=event.LCP_TakeoverCompleted.state;
     }
-     	unsigned state;
   };
 
   class TransReportCountersEvent : public BaseEvent { 
   public:
+    unsigned transCount;
+    unsigned commitCount;
+    unsigned readCount;
+    unsigned simpleReadCount;
+    unsigned writeCount;
+    unsigned attrinfoCount;
+    unsigned concOpCount;
+    unsigned abortCount;
+    unsigned scanCount;
+    unsigned rangeScanCount;
     TransReportCountersEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      transCount=event.TransReportCounters.trans_count;
+      commitCount=event.TransReportCounters.commit_count;
+      readCount=event.TransReportCounters.read_count;
+      simpleReadCount=event.TransReportCounters.simple_read_count;
+      writeCount=event.TransReportCounters.write_count;
+      attrinfoCount=event.TransReportCounters.attrinfo_count;
+      concOpCount=event.TransReportCounters.conc_op_count;
+      abortCount=event.TransReportCounters.abort_count;
+      scanCount=event.TransReportCounters.scan_count;
+      rangeScanCount=event.TransReportCounters.range_scan_count;
     }
-     	unsigned trans_count;
-	unsigned commit_count;
-	unsigned read_count;
-	unsigned simple_read_count;
-	unsigned write_count;
-	unsigned attrinfo_count;
-	unsigned conc_op_count;
-	unsigned abort_count;
-	unsigned scan_count;
-	unsigned range_scan_count;
+
   };
 
   class OperationReportCountersEvent : public BaseEvent { 
   public:
+
+    unsigned ops;
     OperationReportCountersEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      ops=event.OperationReportCounters.ops;
     }
-     	unsigned ops;
+
   };
 
   class TableCreatedEvent : public BaseEvent { 
   public:
+
+    unsigned tableId;
     TableCreatedEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      tableId=event.TableCreated.table_id;
     }
-     	unsigned table_id;
+
   };
 
   class JobStatisticEvent : public BaseEvent { 
   public:
+
+    unsigned meanLoopCount;
     JobStatisticEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      meanLoopCount=event.JobStatistic.mean_loop_count;
     }
-     	unsigned mean_loop_count;
+
   };
 
   class SendBytesStatisticEvent : public BaseEvent { 
   public:
+
+    unsigned toNode;
+    unsigned meanSentBytes;
     SendBytesStatisticEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      toNode=event.SendBytesStatistic.to_node;
+      meanSentBytes=event.SendBytesStatistic.mean_sent_bytes;
     }
-     	unsigned to_node;
-	unsigned mean_sent_bytes;
+
   };
 
   class ReceiveBytesStatisticEvent : public BaseEvent { 
   public:
+
+    unsigned fromNode;
+    unsigned meanReceivedBytes;
     ReceiveBytesStatisticEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      fromNode=event.ReceiveBytesStatistic.from_node;
+      meanReceivedBytes=event.ReceiveBytesStatistic.mean_received_bytes;
     }
-     	unsigned from_node;
-	unsigned mean_received_bytes;
+
   };
 
   class MemoryUsageEvent : public BaseEvent { 
   public:
+
+    int      gth;
+    unsigned pageSizeKb;
+    unsigned pagesUsed;
+    unsigned pagesTotal;
+    unsigned block;
     MemoryUsageEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      gth=event.MemoryUsage.gth;
+      pageSizeKb=event.MemoryUsage.page_size_kb;
+      pagesUsed=event.MemoryUsage.pages_used;
+      pagesTotal=event.MemoryUsage.pages_total;
+      block=event.MemoryUsage.block;
     }
-     	int      gth;
-	unsigned page_size_kb;
-	unsigned pages_used;
-	unsigned pages_total;
-	unsigned block;
+
   };
 
   class TransporterErrorEvent : public BaseEvent { 
   public:
+
+
+    unsigned toNode;
+    unsigned code;
     TransporterErrorEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      toNode=event.TransporterError.to_node;
+      code=event.TransporterError.code;
     }
-     	unsigned to_node;
-	unsigned code;
+
   };
 
   class TransporterWarningEvent : public BaseEvent { 
   public:
+
+    unsigned toNode;
+    unsigned code;
     TransporterWarningEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      toNode=event.TransporterWarning.to_node;
+      code=event.TransporterWarning.code;
     }
-     	unsigned to_node;
-	unsigned code;
+
   };
 
   class MissedHeartbeatEvent : public BaseEvent { 
   public:
+
+    unsigned node;
+    unsigned count;
     MissedHeartbeatEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      node=event.MissedHeartbeat.node;
+      count=event.MissedHeartbeat.count;
     }
-     	unsigned node;
-	unsigned count;
+
   };
 
   class DeadDueToHeartbeatEvent : public BaseEvent { 
   public:
+
+    unsigned node;
     DeadDueToHeartbeatEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      node=event.DeadDueToHeartbeat.node;
     }
-     	unsigned node;
+
   };
 
   class WarningEventEvent : public BaseEvent { 
@@ -631,23 +747,35 @@
     WarningEventEvent(ndb_logevent theEvent) {
       event=theEvent;
     }
-     	/* TODO */
+
+    /* TODO */
+
   };
 
   class SentHeartbeatEvent : public BaseEvent { 
   public:
+
+    unsigned node;
     SentHeartbeatEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      node=event.SentHeartbeat.node;
     }
-     	unsigned node;
+
   };
 
   class CreateLogBytesEvent : public BaseEvent { 
   public:
+
+    unsigned node;
     CreateLogBytesEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      node=event.CreateLogBytes.node;
     }
-     	unsigned node;
+
   };
 
   class InfoEventEvent : public BaseEvent { 
@@ -655,86 +783,145 @@
     InfoEventEvent(ndb_logevent theEvent) {
       event=theEvent;
     }
-     	/* TODO */
+
+    /* TODO */
+
   };
 
   class EventBufferStatusEvent : public BaseEvent { 
   public:
+
+    unsigned usage;
+    unsigned alloc;
+    unsigned max;
+    unsigned applyGciL;
+    unsigned applyGciH;
+    unsigned latestGciL;
+    unsigned latestGciH;
     EventBufferStatusEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      usage=event.EventBufferStatus.usage;
+      alloc=event.EventBufferStatus.alloc;
+      max=event.EventBufferStatus.max;
+      applyGciL=event.EventBufferStatus.apply_gci_l;
+      applyGciH=event.EventBufferStatus.apply_gci_h;
+      latestGciL=event.EventBufferStatus.latest_gci_l;
+      latestGciH=event.EventBufferStatus.latest_gci_h;
     }
-     	unsigned usage;
-	unsigned alloc;
-	unsigned max;
-	unsigned apply_gci_l;
-	unsigned apply_gci_h;
-	unsigned latest_gci_l;
-	unsigned latest_gci_h;
+
   };
 
 
   class BackupStartedEvent : public BaseEvent { 
   public:
+
+    unsigned startingNode;
+    unsigned backupId;
     BackupStartedEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      startingNode=event.BackupStarted.starting_node;
+      backupId=event.BackupStarted.backup_id;
     }
-     	unsigned starting_node;
-	unsigned backup_id;
+
   };
 
   class BackupFailedToStartEvent : public BaseEvent { 
   public:
+
+    unsigned startingNode;
+    unsigned error;
     BackupFailedToStartEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      startingNode=event.BackupFailedToStart.starting_node;
+      error=event.BackupFailedToStart.error;
     }
-     	unsigned starting_node;
-	unsigned error;
+
   };
 
   class BackupCompletedEvent : public BaseEvent { 
   public:
+
+    unsigned startingNode;
+    unsigned backupId; 
+    unsigned startGci;
+    unsigned stopGci;
+    unsigned numRecords; 
+    unsigned numLogRecords;
+    unsigned numBytes;
+    unsigned numLogBytes;
     BackupCompletedEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      startingNode=event.BackupCompleted.starting_node;
+      backupId=event.BackupCompleted.backup_id; 
+      startGci=event.BackupCompleted.start_gci;
+      stopGci=event.BackupCompleted.stop_gci;
+      numRecords=event.BackupCompleted.n_records; 
+      numLogRecords=event.BackupCompleted.n_log_records;
+      numBytes=event.BackupCompleted.n_bytes;
+      numLogBytes=event.BackupCompleted.n_log_bytes;
     }
-     	unsigned starting_node;
-	unsigned backup_id; 
-	unsigned start_gci;
-	unsigned stop_gci;
-	unsigned n_records; 
-	unsigned n_log_records;
-	unsigned n_bytes;
-	unsigned n_log_bytes;
+
   };
 
   class BackupAbortedEvent : public BaseEvent { 
   public:
+
+    unsigned startingNode;
+    unsigned backupId;
+    unsigned error;
     BackupAbortedEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      startingNode=event.BackupAborted.starting_node;
+      backupId=event.BackupAborted.backup_id;
+      error=event.BackupAborted.error;
     }
-     	unsigned starting_node;
-	unsigned backup_id;
-	unsigned error;
+
   };
 
   class SingleUserEvent : public BaseEvent { 
   public: 
-   SingleUserEvent(ndb_logevent theEvent) {
+
+    unsigned type;
+    unsigned nodeId;
+    SingleUserEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      type=event.SingleUser.type;
+      nodeId=event.SingleUser.node_id;
     }
-             unsigned type;
-        unsigned node_id;
+
   };
 
   class StartReportEvent : public BaseEvent { 
   public:
+
+
+    unsigned reportType;
+    unsigned remainingTime;
+    unsigned bitmaskSize;
+    //unsigned bitmaskData[1];
     StartReportEvent(ndb_logevent theEvent) {
       event=theEvent;
+
+
+      reportType=event.StartReport.report_type;
+      remainingTime=event.StartReport.remaining_time;
+      bitmaskSize=event.StartReport.bitmask_size;
+      //bitmaskData[0]=event.StartReport.bitmask_data[0];
     }
-     	unsigned report_type;
-	unsigned remaining_time;
-	unsigned bitmask_size;
-	unsigned bitmask_data[1];
+
   };
 
 
-%}
+  %}

=== modified file 'java/Makefile.am'
--- a/java/Makefile.am	2007-11-17 20:13:52 +0000
+++ b/java/Makefile.am	2007-11-17 21:15:41 +0000
@@ -50,7 +50,6 @@
       	${package_builddir}/mgmj/NdbLogEventListener.java \
       	${package_builddir}/mgmj/NdbLogEventManager.java \
       	${package_builddir}/mgmj/NdbLogEventTypeListener.java \
-	${package_builddir}/mgmj/SWIG*.java  \
 	${package_builddir}/mgmj/*Event.java 
 
 MGMAPI_BUILT_SRC = ${builddir}/mgmj.cxx $(MGMAPI_BUILT_J)
@@ -270,7 +269,6 @@
       	${package_builddir}/mgmj/NdbLogEventManager.class \
       	${package_builddir}/mgmj/NdbLogEventTypeListener.class  \
 	${package_builddir}/mgmj/MgmApiException.class \
-	${package_builddir}/mgmj/SWIG*class \
 	${package_builddir}/mgmj/*Event.class
 
 

Thread
Rev 261: Finished adding all MGM LogEvent classes. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/develMonty Taylor17 Nov