Examples of RecordFactory


Examples of com.hp.hpl.jena.tdb.base.record.RecordFactory

        // Also flush cache every so often => block writes (but not sequential so boring).
        int readCacheSize = 10 ;
        int writeCacheSize = 100 ;

        int blockSize = SystemTDB.BlockSize ;
        RecordFactory recordFactory = new RecordFactory(dftKeyLength, dftValueLength) ;
       
        int order = BPlusTreeParams.calcOrder(blockSize, recordFactory) ;
        BPlusTreeParams bptParams = new BPlusTreeParams(order, recordFactory) ;

        int blockSizeNodes = blockSize ;
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.record.RecordFactory

public class RecordLib
{
    public static void main(String...argv)
    {
        RecordFactory rf = new RecordFactory(8,4) ;
        Record r = rf.create() ;
        Bytes.setLong(0x123456789ABCDEF0L, r.getKey()) ;
        Bytes.setInt(0x22334455, r.getValue()) ;
        ColumnMap cMap = new ColumnMap("XYAB", "BYXA") ;
        Record r2 = copyRecord(rf, r, cMap) ;
        System.out.println(r) ;
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.record.RecordFactory

    public static Record copyRecord(RecordFactory recordFactory, Record record, ColumnMap colMap)
    {
        int kLen = record.getKey().length ;
        int vLen = record.getValue() == null ? 0 : record.getValue().length ;
        if ( recordFactory == null )
            recordFactory = new RecordFactory(kLen, vLen) ;
        int N = colMap.length() ;
        if ( kLen%N != 0 )
            throw new RecordException("Key length is not a multiple of the number of slots") ;
        int itemLen = kLen/N ;
        Record record2 = recordFactory.create() ;
View Full Code Here

Examples of javax.resource.cci.RecordFactory

        Record outputRecordToUse = outputRecord;
        try {
          if (outputRecord != null || getOutputRecordCreator() != null) {
            // Use the CCI execute method with output record as parameter.
            if (outputRecord == null) {
              RecordFactory recordFactory = getRecordFactory(connectionFactory);
              outputRecordToUse = getOutputRecordCreator().createRecord(recordFactory);
            }
            interaction.execute(spec, inputRecord, outputRecordToUse);
          }
          else {
View Full Code Here

Examples of javax.resource.cci.RecordFactory

   * @see #getRecordFactory(javax.resource.cci.ConnectionFactory)
   * @see javax.resource.cci.RecordFactory#createIndexedRecord(String)
   */
  public IndexedRecord createIndexedRecord(String name) throws DataAccessException {
    try {
      RecordFactory recordFactory = getRecordFactory(getConnectionFactory());
      return recordFactory.createIndexedRecord(name);
    }
    catch (NotSupportedException ex) {
      throw new RecordTypeNotSupportedException("Creation of indexed Record not supported by connector", ex);
    }
    catch (ResourceException ex) {
View Full Code Here

Examples of javax.resource.cci.RecordFactory

   * @see #getRecordFactory(javax.resource.cci.ConnectionFactory)
   * @see javax.resource.cci.RecordFactory#createMappedRecord(String)
   */
  public MappedRecord createMappedRecord(String name) throws DataAccessException {
    try {
      RecordFactory recordFactory = getRecordFactory(getConnectionFactory());
      return recordFactory.createMappedRecord(name);
    }
    catch (NotSupportedException ex) {
      throw new RecordTypeNotSupportedException("Creation of mapped Record not supported by connector", ex);
    }
    catch (ResourceException ex) {
View Full Code Here

Examples of javax.resource.cci.RecordFactory

   * @see #getRecordFactory(javax.resource.cci.ConnectionFactory)
   * @see RecordCreator#createRecord(javax.resource.cci.RecordFactory)
   */
  protected Record createRecord(RecordCreator recordCreator) throws DataAccessException {
    try {
      RecordFactory recordFactory = getRecordFactory(getConnectionFactory());
      return recordCreator.createRecord(recordFactory);
    }
    catch (NotSupportedException ex) {
      throw new RecordTypeNotSupportedException(
          "Creation of the desired Record type not supported by connector", ex);
View Full Code Here

Examples of org.apache.hadoop.yarn.factories.RecordFactory

    FiCaSchedulerNode node_0 = TestUtils.getMockNode(host_0, rack_0, 0, 16*GB);

    final String user_0 = "user_0";
    final String user_1 = "user_1";
   
    RecordFactory recordFactory =
        RecordFactoryProvider.getRecordFactory(null);
    RMContext rmContext = TestUtils.getMockRMContext();

    Priority priority_1 = TestUtils.createMockPriority(1);

View Full Code Here

Examples of org.apache.hadoop.yarn.factories.RecordFactory

    RMContext rmContext = mock(RMContext.class);
    when(rmContext.getRMApps()).thenReturn(
        new ConcurrentHashMap<ApplicationId, RMApp>());
    ClientRMService rmService = new ClientRMService(rmContext, null, null,
        null, null, null);
    RecordFactory recordFactory = RecordFactoryProvider.getRecordFactory(null);
    GetApplicationReportRequest request = recordFactory
        .newRecordInstance(GetApplicationReportRequest.class);
    request.setApplicationId(ApplicationId.newInstance(0, 0));
    try {
      rmService.getApplicationReport(request);
      Assert.fail();
View Full Code Here

Examples of org.apache.hadoop.yarn.factories.RecordFactory

 
  @Test
  public void testGetApplicationAttemptReport() throws YarnException,
      IOException {
    ClientRMService rmService = createRMService();
    RecordFactory recordFactory = RecordFactoryProvider.getRecordFactory(null);
    GetApplicationAttemptReportRequest request = recordFactory
        .newRecordInstance(GetApplicationAttemptReportRequest.class);
    ApplicationAttemptId attemptId = ApplicationAttemptId.newInstance(
        ApplicationId.newInstance(123456, 1), 1);
    request.setApplicationAttemptId(attemptId);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.