Package org.lilyproject.util.repo

Examples of org.lilyproject.util.repo.RecordEvent.toJsonBytes()


        filterData.setSubscriptionInclusions(ImmutableSet.of(INDEX_NAME));
        recordEvent.setIndexRecordFilterData(filterData);

        WALEdit walEdit = new WALEdit();
        walEdit.add(new KeyValue(Bytes.toBytes("row"), RecordCf.DATA.bytes, RecordColumn.PAYLOAD.bytes,
                recordEvent.toJsonBytes()));

        editFilter.apply(walEdit);

        assertEquals(1, walEdit.size());
    }
View Full Code Here


        recordEvent.setIndexRecordFilterData(filterData);
        recordEvent.getAttributes().put(IndexerEditFilter.NO_INDEX_FLAG, "false");

        WALEdit walEdit = new WALEdit();
        walEdit.add(new KeyValue(Bytes.toBytes("row"), RecordCf.DATA.bytes, RecordColumn.PAYLOAD.bytes,
                recordEvent.toJsonBytes()));

        editFilter.apply(walEdit);

        assertEquals(0, walEdit.size());
    }
View Full Code Here

                    Bytes.add(new byte[]{LilyHBaseSchema.RecordColumn.DATA_PREFIX}, fieldType.getId().getBytes()),
                    output.toByteArray()));
        }
       
        // fields to delete, should we add these too?
        kvs.add(new KeyValue(rowKey, family, LilyHBaseSchema.RecordColumn.PAYLOAD.bytes, event.toJsonBytes()));

        return new Result(kvs);
    }

    private static class FakeSolrUpdateWriter implements SolrUpdateWriter {
View Full Code Here

            filterData.setSubscriptionInclusions(ImmutableSet.of(this.subscriptionId));
            payload.setIndexRecordFilterData(filterData);

            try {
                eventPublisherManager.getEventPublisher(repo, referrer.getTable()
                ).publishEvent(referrer.getRecordId().toBytes(), payload.toJsonBytes());
            } catch (Exception e) {
                // We failed to put the message: this is pretty important since it means the record's index
                // won't get updated, therefore log as error, but after this we continue with the next one.
                log.error("Error putting index message on queue of record " + referrer, e);
                //metrics.errors.inc();
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.