Package com.taobao.metamorphosis.tools.query

Examples of com.taobao.metamorphosis.tools.query.OffsetQueryDO


            for (Map.Entry<Partition, Partition> entry : srcTargetPartitionMap.entrySet()) {
                Partition oldPartition = entry.getKey();
                Partition newPartition = entry.getValue();

                String srcOffset = this.query.queryOffset(new OffsetQueryDO(topic, group, oldPartition.toString(), "zk"));
                if (!StringUtils.isBlank(srcOffset)) {
                    if (!StringUtils.isBlank(this.query.queryOffset(new OffsetQueryDO(topic, group, newPartition.toString(), "zk")))) {
                        this.println("topic=" + topic + ",group=" + group + ",partition[" + newPartition
                                + "] offset �Ѿ�����");
                        continue;
                    }
                    this.zkManager.setOffset(topic, group, newPartition, srcOffset);
View Full Code Here


            List<String> topicsList = this.query.getTopicsExistOffset(group, QueryType.zk);
            for (String topic : topicsList) {
              List<String> partitions = this.query.getPartitionsOf(group, topic, QueryType.zk);
                for (String partition : partitions) {
                    long newOffset =ZkOffsetStorageQuery.parseOffsetAsLong(
                            this.query.queryOffset(new OffsetQueryDO(topic, group, partition, QueryType.zk.toString())));
                    String key = this.makeKey(group, topic, partition);
                    InnerOffsetValue newValue = new InnerOffsetValue(newOffset, System.currentTimeMillis());
                    InnerOffsetValue oldVlaue = this.offsetMap.get(key);
                    // �ɵļ�¼������,����offset�ƶ����IJ���Ҫput,��������ֵ�Ա�ȡ�����һ��offset�ƶ�����ʱ��
                    if (oldVlaue == null || newValue.offset != oldVlaue.offset) {
View Full Code Here

            topic, QueryType.zk);
        for (String partition : partitions) {
          // brokeId+topic��ɵ�key
          String key = partition+"_"+topic;
          String serverUrl = getServerUrl(partition);
          long zkOffset = ZkOffsetStorageQuery.parseOffsetAsLong(this.query.queryOffset(new OffsetQueryDO(topic, group, partition, QueryType.zk.toString())));
          long serverMaxOffset;
//          if (null == serverMaxOffsetMap.get(key)) {
//            ��server�˻�ȡoffset��ֵ
           
//            serverMaxOffset = getServerMaxOffset(serverUrl,topic,partition,serverMaxOffsetMap);
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.tools.query.OffsetQueryDO

Copyright © 2018 www.massapicom. 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.