Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2754

unwanted docs in mapreduce out collection

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 1.8.0-rc2
    • MapReduce
    • None
    • Red Hat Enterprise Linux Server release 5.4 (Tikanga) x86_64
    • Linux

    Description

      There are some unwanted docs in output of mapreduce. After I switched to 1.6.5, the unwanted docs disappeared. For example,

      rs1:PRIMARY> db.metering.find()
      { "_id" : ObjectId("4d7e389b9182b3d84087ca12"), "tenId" : "cdp", "subId" : "subt1", "userId" : "user1", "interval" : "2010-10-27-01", "policies" : { "default" :

      { "diskDelta" : 653, "umdDelta" : 34 }

      }, "accessPaths" : { "rest" :

      { "bwIn" : 984, "bwOut" : 474, "txNum" : 6 }

      } }
      { "_id" : ObjectId("4d7e38c49182b3d84087ca13"), "tenId" : "cdp", "subId" : "subt1", "userId" : "user2", "interval" : "2010-10-28-01", "policies" : { "policy1" :

      { "diskDelta" : 10, "umdDelta" : 10 }

      }, "accessPaths" : { "rest" :

      { "bwIn" : 1, "bwOut" : 474, "txNum" : 6 }

      } }
      { "_id" : ObjectId("4d7e3aa89182b3d84087ca14"), "tenId" : "cdp", "subId" : "subt1", "userId" : "user2", "interval" : "2010-10-29-01", "policies" : { "policy1" :

      { "diskDelta" : 20, "umdDelta" : 20 }

      }, "accessPaths" : { "rest" :

      { "bwIn" : 1, "bwOut" : 474, "txNum" : 6 }

      } }
      rs1:PRIMARY> db.nnn.drop()
      true
      rs1:PRIMARY> m
      function () {
      emit(

      {tenId:this.tenId, subId:this.subId, userId:this.userId, interval:"2011-03-14-00"}

      ,

      {policies:this.policies}

      );
      }
      rs1:PRIMARY> r
      function () {
      return

      {du:0, umd:0}

      ;
      }
      rs1:PRIMARY> db.metering.mapReduce(m,r,

      { out : "nnn"}

      );
      {
      "result" : "nnn",
      "timeMillis" : 2,
      "counts" :

      { "input" : 3, "emit" : 3, "output" : 2 }

      ,
      "ok" : 1,
      }
      rs1:PRIMARY> db.nnn.find()
      { "_id" :

      { "tenId" : "cdp", "subId" : "subt1", "userId" : "user1", "interval" : "2011-03-14-00" }

      , "value" : { "policies" : { "default" :

      { "diskDelta" : 653, "umdDelta" : 34 }

      } } }
      { "_id" :

      { "tenId" : "cdp", "subId" : "subt1", "userId" : "user2", "interval" : "2011-03-14-00" }

      , "value" :

      { "du" : 0, "umd" : 0 }

      }
      rs1:PRIMARY>

      Attachments

        Activity

          People

            Unassigned Unassigned
            vesafb Everett Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: