Hello I wanted to use postgresql with sequoia 3.0 beta.

I have covered one failure in the virtualdatabase/raidb1-controller1.xml and  
virtualdatabase/raidb1-controller2.xml

The comment unter <SEQUOIA> has one  "- " to much in then end of the  comment.

After I resolved this failure a new one appeard:

ERROR controller.xml.DatabasesParser Xml document has not been validated.
ERROR controller.xml.DatabasesParser Element "VirtualDatabase" does not allow 
"RequestManager" here.
 ERROR controller.xml.DatabasesParser Element "VirtualDatabase" requires 
additional elements.

Here is my virtualdatabase.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE SEQUOIA PUBLIC "-//Continuent//DTD SEQUOIA 2.10.2//EN" 
"http://sequoia.continuent.org/dtds/sequoia-2.10.2.dtd";>


<SEQUOIA>
  <!-- Virtual database name should match the name used in the Sequoia driver 
    URL. Example: jdbc:sequoia://c1,c2/myDB --->
  <VirtualDatabase name="lportalv">

    <!-- This section defines the group communication settings for 
      synchronizing multiple controllers. Default is to get configuration from
      hedera_appia.properties to be found in classpath. -->
    <Distribution>
      <MessageTimeouts/>
    </Distribution>

    <!-- Backupers are used for database backup/restore operations -->    
    <Backup>
<!--   
      <Backuper backuperName="mysql" 
className="org.continuent.sequoia.controller.backup.backupers.MySQLBackuper"/>
      <Backuper backuperName="postgresql" 
className="org.continuent.sequoia.controller.backup.backupers.PostgreSQLBinaryBackuper"/>
 --> 
    <Backuper backuperName="octopus" 
className="org.continuent.sequoia.controller.backup.backupers.OctopusBackuper" 
options="zip=true"/>
    </Backup>
    
    <!-- All users must be defined in the authentication manager. AdminUsers 
      are used to connect with the administration console. VirtualUsers are
      the one connecting using a Sequoia driver (JDBC, ODBC, ...) -->
    <AuthenticationManager>
      <AdminUser username="admin" password="admin"/>
      <VirtualUser vLogin="user" vPassword="user"/>
    </AuthenticationManager>

    <!-- Example of a MySQL backend attached to this controller -->
    <DatabaseBackend name="node1" driver="org.postgresql.Driver" 
url="jdbc:postgresql://localhost:5432/testdb1" 
connectionTestStatement="select now()">
      <!-- A connection pool must be defined for each user -->
      <ConnectionManager vLogin="user"  rLogin="postgres" rPassword="">
        <VariablePoolConnectionManager initPoolSize="10" maxPoolSize="50"/>
      </ConnectionManager>
    </DatabaseBackend>

    <!-- Example of a PostgreSQL backend attached to this controller -->
    <DatabaseBackend name="node2" driver="org.postgresql.Driver" 
url="jdbc:postgresql://localhost:5432/testdb2" 
connectionTestStatement="select now()">
      <!-- A connection pool must be defined for each user -->
      <ConnectionManager vLogin="user" rLogin="postgres" rPassword="">
        <VariablePoolConnectionManager initPoolSize="10" maxPoolSize="50"/>
      </ConnectionManager>
    </DatabaseBackend>

    <!-- The RequestManager defines the replication strategy. Here we use a
      RAIDb-1 configuration (RAIDb-1 means full replication) -->
  <RequestManager>
      <!-- There is only one RAIDb-1 scheduler available at this time -->
      <RequestScheduler>
         <RAIDb-1Scheduler level="passThrough"/>
      </RequestScheduler>

      <!-- Caches are optional and can reduce latency in query execution. To
        disable caches, remove the RequestCache element altogether. -->
      <RequestCache>
        <!-- Metadata cache keeps ResultSet metadata information such as 
          column names, data types, ... -->
     <MetadataCache/>        
         <ParsingCache/>
      </RequestCache>

      <!-- Load balancer definition to define how request will be distributed 
        among the backends attached to this controller -->      
      <LoadBalancer>
         <RAIDb-1>
           <!-- Set a policy to return the result as soon as the first 
             backend has completed successfully. Set to 'all' to force 
             synchronization of all backends. -->
           <WaitForCompletion policy="first"/>
           <!-- Specify how macros should be converted to be consistent on all
             cluster nodes -->
           <MacroHandling>
             <RandomMacro macroName="rand()"/>
             <DateMacro macroName="now()" dateFormat="timestamp"/>
             <DateMacro macroName="current_date()" dateFormat="date"/>
             <DateMacro macroName="current_date" dateFormat="date"/>
             <DateMacro macroName="timeofday()" dateFormat="time"/>
             <DateMacro macroName="current_timestamp()" dateFormat="timestamp"/>
             <DateMacro macroName="current_timestamp" dateFormat="timestamp"/>
             <DateMacro macroName="current_time()" dateFormat="time"/>
             <DateMacro macroName="current_time" dateFormat="time"/>
           </MacroHandling>
           <RAIDb-1-LeastPendingRequestsFirst/>
         </RAIDb-1>
      </LoadBalancer>
      
      <!-- Example of a recovery log definition using an POSTGRESQL running on 
port
        5432 -->
      <RecoveryLog driver="org.postgresql.Driver"
       url="jdbc:postgresql://localhost:5432/testrec" login="postgres" 
password="">

       <RecoveryLogTable tableName="recovery" logIdColumnType="BIGINT NOT NULL"
         vloginColumnType="VARCHAR NOT NULL" sqlColumnType="VARCHAR NOT NULL"
         extraStatementDefinition=",PRIMARY KEY (log_id)"/>

       <CheckpointTable tableName="checkpoint"
         checkpointNameColumnType="VARCHAR NOT NULL"/>

       <BackendTable tableName="backend"
         databaseNameColumnType="VARCHAR NOT NULL"
         backendNameColumnType="VARCHAR NOT NULL"
         checkpointNameColumnType="VARCHAR NOT NULL"/>

       <DumpTable tableName="dump" dumpNameColumnType="VARCHAR NOT NULL"
         dumpDateColumnType="TIMESTAMP"
         dumpPathColumnType="VARCHAR NOT NULL"
         dumpFormatColumnType="VARCHAR NOT NULL"
         checkpointNameColumnType="VARCHAR NOT NULL"
         backendNameColumnType="VARCHAR NOT NULL"
         tablesColumnType="VARCHAR NOT NULL"/>
     </RecoveryLog> 
      
    </RequestManager>

  </VirtualDatabase>

</SEQUOIA>

Thanks David

 




_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to