Add lentils to a small pot and cover with about one inch of cold water. Bring to a boil and reduce to simmer and cook for about 20 minutes, covered. Lentils should be cooked, slightly firm and not mushy. Drain and set aside.
Meanwhile, heat a heavy bottomed pot or dutch oven over medium-high heat. Add oil and let warm slightly. Add cumin seeds and black peppercorns and fry for about 1 minute or until fragrant. Add onions, one teaspoon of salt, and stir to combine. Keep cooking and stir with a wooden spoon occasionally until onions are deeply browned and caramelized, about 25 minutes or so. Don’t rush this part and be careful not to burn the onions. Make sure to stir and scrape browned bits off the bottom of the pan. If onions stick, add a teaspoon of water and stir.
Once onions are browned, remove half the onions and set aside. Add ground cumin, allspice, garlic powder, cinnamon stick, and cayenne and stir, cook for about 1 minute. Add basmati rice and gently stir to coat with onion mixture, about 1 more minute being careful not to break the rice. Add water, lentils, 1 and ½ teaspoons salt and bring to boil. Reduce heat to low and simmer uncovered for 9 minutes. Remove from heat and keep covered for 15 minutes, letting residual heat continue to cook rice. The water should be completely absorbed and rice should be tender.
When ready to serve, gently stir rice and lentils together. Garnish with reserved onions and parsley. Serve with yogurt raita and a squeeze of lemon.